summaryrefslogtreecommitdiff
path: root/simplegui.mod
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2005-09-26 00:05:01 +0000
committerIan C <ianc@noddybox.co.uk>2005-09-26 00:05:01 +0000
commit2ffb85bea1c792083c3f63e5c5a7ac9ff08612de (patch)
treef8ad86a3da8ec3136ba1b8a2ca736d7955016132 /simplegui.mod
parentffe3de3fb96721b10e7cb77ac8108a3e145cc1bc (diff)
Fixed bug where ESC exited Dialog when something had the focus
Diffstat (limited to 'simplegui.mod')
-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