1
0

Implement DIALOG(3)

This commit is contained in:
otya128
2016-12-26 22:16:22 +09:00
parent 80bc64ee9c
commit 0f5c8e08a2
2 changed files with 26 additions and 7 deletions

View File

@@ -3053,6 +3053,32 @@ class BuiltinFunction
}
import otya.smilebasic.dialog;
import otya.smilebasic.project;
static void DIALOG(PetitComputer p, wstring text, out int result)
{
auto dialog = new Dialog(p);
result = p.project.result = cast(DialogResult)dialog.show(text);
}
static void DIALOG(PetitComputer p, wstring text, DefaultValue!int selType, out int result)
{
selType.setDefaultValue(0);
auto dialog = new Dialog(p);
result = p.project.result = cast(DialogResult)dialog.show(text, cast(SelectionType)selType);
}
static void DIALOG(PetitComputer p, wstring text, DefaultValue!int selType, DefaultValue!wstring cap, out int result)
{
selType.setDefaultValue(0);
cap.setDefaultValue("■DIALOG");
auto dialog = new Dialog(p);
result = p.project.result = cast(DialogResult)dialog.show(text, cast(SelectionType)selType, cast(wstring)cap);
}
static void DIALOG(PetitComputer p, wstring text, DefaultValue!int selType, DefaultValue!wstring cap, DefaultValue!int timeout, out int result)
{
selType.setDefaultValue(0);
cap.setDefaultValue("■DIALOG");
timeout.setDefaultValue(0);
auto dialog = new Dialog(p);
result = p.project.result = cast(DialogResult)dialog.show(text, cast(SelectionType)selType, cast(wstring)cap, cast(int)timeout);
}
static void DIALOG(PetitComputer p, wstring text)
{
auto dialog = new Dialog(p);