1
0

Implement DIALOG(WIP)

This commit is contained in:
otya128
2016-12-25 21:34:22 +09:00
parent f88715ba76
commit c9b17550cf
2 changed files with 10 additions and 1 deletions

View File

@@ -3051,6 +3051,13 @@ class BuiltinFunction
throw new OutOfRange("KEY", 1);
key = new Array!wchar(cast(wchar[])p.functionKey[index]);
}
import otya.smilebasic.dialog;
import otya.smilebasic.project;
static void DIALOG(PetitComputer p, wstring text)
{
auto dialog = new Dialog(p);
p.project.result = cast(DialogResult)dialog.show(text);
}
//alias void function(PetitComputer, Value[], Value[]) BuiltinFunc;
static BuiltinFunctions[wstring] builtinFunctions;
static wstring getBasicName(BFD)(const wstring def)

View File

@@ -1626,8 +1626,9 @@ class PetitComputer
return currentDisplay.rect[1];
}
auto rect = currentDisplay.rect[0];
rect.y += rect.h;
rect.y = 0;
currentDisplay.windowSize.height += rect.h;
currentDisplay.yoffset = currentDisplay.windowSize.height;
updateWindowSize();
return rect;
}
@@ -1639,6 +1640,7 @@ class PetitComputer
}
auto rect = currentDisplay.rect[0];
currentDisplay.windowSize.height -= rect.h;
currentDisplay.yoffset = currentDisplay.windowSize.height;
updateWindowSize();
}
//プチコン内部表現はRGB5_A1