[Scummvm-cvs-logs] CVS: scummvm/scumm dialogs.cpp,1.26,1.27 dialogs.h,1.10,1.11
Max Horn
fingolfin at users.sourceforge.net
Fri Nov 22 06:03:10 CET 2002
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/gui EditTextWidget.cpp,1.4,1.5 EditTextWidget.h,1.2,1.3 ListWidget.cpp,1.16,1.17 ListWidget.h,1.11,1.12 dialog.cpp,1.25,1.26 dialog.h,1.16,1.17 newgui.cpp,1.30,1.31 newgui.h,1.17,1.18 widget.h,1.10,1.11
- Next message: [Scummvm-cvs-logs] CVS: scummvm/backends/sdl sdl-common.cpp,1.15,1.16
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv30017
Modified Files:
dialogs.cpp dialogs.h
Log Message:
changed the key input system in NewGUI: pass both the keycode and the ascii value to handleKeyUp/Down. Also, use this to fix the key repeat code (see bug #626225)
Index: dialogs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/dialogs.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- dialogs.cpp 17 Nov 2002 17:59:00 -0000 1.26
+++ dialogs.cpp 22 Nov 2002 14:02:53 -0000 1.27
@@ -752,13 +752,13 @@
}
}
-void KeysDialog::handleKeyDown(char key, int modifiers) {
+void KeysDialog::handleKeyDown(uint16 ascii, int keycode, int modifiers) {
if (modifiers == 0xff && _get_key_mapping) {
// GAPI key was selected
char selection[100];
- clearActionKey(key & 0xff);
- getAction(_actionSelected)->action_key = (key & 0xff);
+ clearActionKey(ascii & 0xff);
+ getAction(_actionSelected)->action_key = (ascii & 0xff);
sprintf(selection, "Associated key : %s", getGAPIKeyName((unsigned int)getAction(_actionSelected)->action_key));
_actionTitle->setLabel(queryCustomString(25));
_keyMapping->setLabel(selection);
Index: dialogs.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/dialogs.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- dialogs.h 6 Nov 2002 00:56:31 -0000 1.10
+++ dialogs.h 22 Nov 2002 14:02:54 -0000 1.11
@@ -118,12 +118,12 @@
virtual void handleMouseDown(int x, int y, int button, int clickCount)
{ close(); }
- virtual void handleKeyDown(char key, int modifiers)
+ virtual void handleKeyDown(uint16 ascii, int keycode, int modifiers)
{
- if (key == ' ') // Close pause dialog if space key is pressed
+ if (ascii == ' ') // Close pause dialog if space key is pressed
close();
else
- ScummDialog::handleKeyDown(key, modifiers);
+ ScummDialog::handleKeyDown(ascii, keycode, modifiers);
}
protected:
void setInfoText (const String& message);
@@ -141,7 +141,7 @@
KeysDialog(NewGui *gui, Scumm *scumm);
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
- virtual void handleKeyDown(char key, int modifiers);
+ virtual void handleKeyDown(uint16 ascii, int keycode, int modifiers);
protected:
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/gui EditTextWidget.cpp,1.4,1.5 EditTextWidget.h,1.2,1.3 ListWidget.cpp,1.16,1.17 ListWidget.h,1.11,1.12 dialog.cpp,1.25,1.26 dialog.h,1.16,1.17 newgui.cpp,1.30,1.31 newgui.h,1.17,1.18 widget.h,1.10,1.11
- Next message: [Scummvm-cvs-logs] CVS: scummvm/backends/sdl sdl-common.cpp,1.15,1.16
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list