summaryrefslogtreecommitdiff
path: root/simplegui.mod/simplegui.bmx
diff options
context:
space:
mode:
Diffstat (limited to 'simplegui.mod/simplegui.bmx')
-rw-r--r--simplegui.mod/simplegui.bmx4
1 files changed, 2 insertions, 2 deletions
diff --git a/simplegui.mod/simplegui.bmx b/simplegui.mod/simplegui.bmx
index 90eb595..a7ca95c 100644
--- a/simplegui.mod/simplegui.bmx
+++ b/simplegui.mod/simplegui.bmx
@@ -953,7 +953,7 @@ End Function
Rem
bbdoc: Handles a TGUIHandler as if it's a modal dialog.
-returns: True if @ok is pressed, False if @cancel or the ESCAPE key is pressed.
+returns: True if @ok is pressed, False if @cancel or the ESCAPE key is pressed. ESCAPE is only allowed if nothing has the text focus.
about: @gui is the GUI handler and widgets to display as a dialog., @ok is the clickable widget that OK's the dialog, @cancel the widget that cancels it.
about: If @i is not null then this image is drawn as a mouse cursor.
EndRem
@@ -978,7 +978,7 @@ Function GUIDialog(gui:TGUIHandler, ok:TWidget, cancel:TWidget, i:TImage=Null)
ok_pressed=True
EndIf
- If click=cancel Or KeyHit(KEY_ESCAPE)
+ If click=cancel Or (KeyHit(KEY_ESCAPE) And gui.GetFocus()=Null)
done=True
ok_pressed=False
EndIf