UNPKG

dazscript-framework

Version:

The **DazScript Framework** is a TypeScript-based framework for writing Daz Studio scripts. It provides all the advantages of a typed language such as autocompletion, error checking, and method parameter documentation and hinting. The framework also inclu

16 lines (12 loc) 514 B
import * as log from "@dsf/common/log" export const info = (msg: string) => { MessageBox.information(msg, "", "Ok") } export const error = (message: string, writeLog?: boolean) => { if (writeLog) log.debug(message) MessageBox.critical(message, "Error", "Ok") } export const confirm = (message?: string): { ok: boolean, cancel: boolean } => { var response = MessageBox.question(message ?? "Confirm?", "", "Ok", "Cancel"); return { ok: response == 0, cancel: response != 0 }; }