From c5aa10fcc8a182141e2a0097b5ab7c85882ab610 Mon Sep 17 00:00:00 2001 From: otya128 Date: Mon, 26 Dec 2016 21:30:39 +0900 Subject: [PATCH] Fox dialog --- SMILEBASIC/dialog.d | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SMILEBASIC/dialog.d b/SMILEBASIC/dialog.d index be09842..d6c3aa0 100644 --- a/SMILEBASIC/dialog.d +++ b/SMILEBASIC/dialog.d @@ -211,6 +211,8 @@ class Dialog : DialogBase int show(wstring text, SelectionType selType = SelectionType.ok, wstring caption = "â– DIALOG", int timeout = 0) { area = petitcom.showTouchScreen(); + scope (exit) + petitcom.hideTouchScreen(); wchar[257] buffer; if (text.length > 256) { @@ -265,6 +267,8 @@ class Dialog : DialogBase buttons = [button1]; } petitcom.dialog = this; + scope (exit) + petitcom.dialog = null; bool isPressed; while (!isPressed) { @@ -285,8 +289,6 @@ class Dialog : DialogBase } SDL_Delay(16); } - petitcom.dialog = null; - petitcom.hideTouchScreen(); return result; } }