1
0

Fox dialog

This commit is contained in:
otya128
2016-12-26 21:30:39 +09:00
parent ef92021969
commit c5aa10fcc8

View File

@@ -211,6 +211,8 @@ class Dialog : DialogBase
int show(wstring text, SelectionType selType = SelectionType.ok, wstring caption = "■DIALOG", int timeout = 0) int show(wstring text, SelectionType selType = SelectionType.ok, wstring caption = "■DIALOG", int timeout = 0)
{ {
area = petitcom.showTouchScreen(); area = petitcom.showTouchScreen();
scope (exit)
petitcom.hideTouchScreen();
wchar[257] buffer; wchar[257] buffer;
if (text.length > 256) if (text.length > 256)
{ {
@@ -265,6 +267,8 @@ class Dialog : DialogBase
buttons = [button1]; buttons = [button1];
} }
petitcom.dialog = this; petitcom.dialog = this;
scope (exit)
petitcom.dialog = null;
bool isPressed; bool isPressed;
while (!isPressed) while (!isPressed)
{ {
@@ -285,8 +289,6 @@ class Dialog : DialogBase
} }
SDL_Delay(16); SDL_Delay(16);
} }
petitcom.dialog = null;
petitcom.hideTouchScreen();
return result; return result;
} }
} }