[Scummvm-cvs-logs] CVS: scummvm/gui dialog.cpp,1.29,1.30
Torbj?rn Andersson
eriktorbjorn at users.sourceforge.net
Wed Jul 23 09:45:09 CEST 2003
Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1:/tmp/cvs-serv29451
Modified Files:
dialog.cpp
Log Message:
Don't check for hotkeys when ascii is 0, since that is the default hotkey
for widgets that have none. (This means the Shift key words in text edit
widgets again, for instance.)
Index: dialog.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/dialog.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- dialog.cpp 22 Jul 2003 16:30:00 -0000 1.29
+++ dialog.cpp 23 Jul 2003 16:44:15 -0000 1.30
@@ -184,17 +184,19 @@
}
// Hotkey handling
- Widget *w = _firstWidget;
- ascii = toupper(ascii);
- while (w) {
- if (w->_type == kButtonWidget && ascii == toupper(((ButtonWidget *)w)->_hotkey)) {
- // The hotkey for widget w was pressed. We fake a mouse click into the
- // button by invoking the appropriate methods.
- w->handleMouseDown(0, 0, 1, 1);
- w->handleMouseUp(0, 0, 1, 1);
- return;
+ if (ascii != 0) {
+ Widget *w = _firstWidget;
+ ascii = toupper(ascii);
+ while (w) {
+ if (w->_type == kButtonWidget && ascii == toupper(((ButtonWidget *)w)->_hotkey)) {
+ // The hotkey for widget w was pressed. We fake a mouse click into the
+ // button by invoking the appropriate methods.
+ w->handleMouseDown(0, 0, 1, 1);
+ w->handleMouseUp(0, 0, 1, 1);
+ return;
+ }
+ w = w->_next;
}
- w = w->_next;
}
// ESC closes all dialogs by default
More information about the Scummvm-git-logs
mailing list