From 101f608d40b986af0488eca21936be100813b88a Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Thu, 3 Nov 2011 08:10:39 -0200 Subject: [PATCH] fix key input on windows --- modules/about/aboutwindow.otui | 61 ------------ modules/entergame/characterlist.lua | 2 +- modules/options/optionswindow.otui | 116 ----------------------- src/framework/platform/win32platform.cpp | 6 ++ 4 files changed, 7 insertions(+), 178 deletions(-) delete mode 100644 modules/about/aboutwindow.otui delete mode 100644 modules/options/optionswindow.otui diff --git a/modules/about/aboutwindow.otui b/modules/about/aboutwindow.otui deleted file mode 100644 index bd48f73a..00000000 --- a/modules/about/aboutwindow.otui +++ /dev/null @@ -1,61 +0,0 @@ -MainWindow - id: infoWindow - title: Info - size: 244 221 - - FlatPanel - size: 208 129 - anchors.left: parent.left - anchors.top: parent.top - margin.top: 32 - margin.left: 18 - - Label - align: center - text: |- - OTClient - Version 0.2.0 - Created by edubart - anchors.horizontalCenter: parent.horizontalCenter - anchors.top: parent.top - margin.top: 20 - - HorizontalSeparator - size: 190 2 - anchors.left: parent.left - anchors.top: parent.top - margin.top: 83 - margin.left: 9 - - Label - text: Official Website - anchors.left: parent.left - anchors.bottom: parent.bottom - margin.bottom: 14 - margin.left: 9 - - Button - text: Github Page - size: 88 24 - anchors.right: parent.right - anchors.bottom: parent.bottom - margin.bottom: 9 - margin.right: 9 - onClick: displayErrorBox("Error", "Not implemented yet") - - HorizontalSeparator - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - margin.bottom: 40 - margin.left: 13 - margin.right: 13 - - Button - text: Ok - size: 46 24 - anchors.left: parent.left - anchors.top: parent.top - margin.top: 191 - margin.left: 188 - onClick: function(self) self:getParent():destroy() end diff --git a/modules/entergame/characterlist.lua b/modules/entergame/characterlist.lua index 49f98714..8ee7f4fc 100644 --- a/modules/entergame/characterlist.lua +++ b/modules/entergame/characterlist.lua @@ -91,7 +91,7 @@ end function CharacterList.destroy() CharacterList.hide() - if not Game.isOnline then + if not Game.isOnline() then EnterGame.show() end end diff --git a/modules/options/optionswindow.otui b/modules/options/optionswindow.otui deleted file mode 100644 index 3e8ff3d3..00000000 --- a/modules/options/optionswindow.otui +++ /dev/null @@ -1,116 +0,0 @@ -MainWindow - id: optionsWindow - title: Options - size: 286 262 - - // general - Button - text: General - anchors.left: parent.left - anchors.top: parent.top - margin.left: 18 - margin.top: 32 - onClick: displayErrorBox("Error", "Not implemented yet") - - Label - text: |- - Change general - game options - anchors.left: prev.right - anchors.top: prev.top - margin.left: 10 - margin.top: -2 - - // graphics - Button - text: Graphics - anchors.left: parent.left - anchors.top: parent.top - margin.left: 18 - margin.top: 65 - onClick: displayErrorBox("Error", "Not implemented yet") - - Label - text: |- - Change graphics and - performance settings - anchors.left: prev.right - anchors.top: prev.top - margin.left: 10 - margin.top: -2 - - // console - Button - text: Console - anchors.left: parent.left - anchors.top: parent.top - margin.left: 18 - margin.top: 98 - onClick: displayErrorBox("Error", "Not implemented yet") - - Label - text: Customise the console - anchors.left: prev.right - anchors.top: prev.top - margin.left: 10 - margin.top: -2 - - // hotkeys - Button - text: Hotkeys - anchors.left: parent.left - anchors.top: parent.top - margin.left: 18 - margin.top: 131 - onClick: displayErrorBox("Error", "Not implemented yet") - - Label - text: Edit your hotkey texts - anchors.left: prev.right - anchors.top: prev.top - margin.left: 10 - margin.top: -2 - - HorizontalSeparator - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - margin.bottom: 97 - margin.left: 18 - margin.right: 18 - - // motd - Button - text: Motd - anchors.left: parent.left - anchors.bottom: parent.bottom - margin.left: 18 - margin.bottom: 60 - onClick: displayErrorBox("Error", "Not implemented yet") - - Label - text: |- - Show the most recent - Message of the Day - anchors.left: prev.right - anchors.top: prev.top - margin.left: 10 - margin.top: -2 - - HorizontalSeparator - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - margin.bottom: 40 - margin.left: 13 - margin.right: 13 - - // ok button - Button - text: Ok - size: 43 20 - anchors.right: parent.right - anchors.bottom: parent.bottom - margin.right: 10 - margin.bottom: 13 - onClick: function(self) self:getParent():destroy() end diff --git a/src/framework/platform/win32platform.cpp b/src/framework/platform/win32platform.cpp index fb92f6b4..744e5c56 100644 --- a/src/framework/platform/win32platform.cpp +++ b/src/framework/platform/win32platform.cpp @@ -151,6 +151,7 @@ void Platform::init(PlatformListener* platformListener, const char *appName) win32.keyMap[VK_MENU] = Fw::KeyMenu; // ascii characters + /* win32.keyMap['!'] = Fw::KeyExclamation; win32.keyMap['"'] = Fw::KeyQuote; win32.keyMap['#'] = Fw::KeyNumberSign; @@ -166,6 +167,7 @@ void Platform::init(PlatformListener* platformListener, const char *appName) win32.keyMap['-'] = Fw::KeyMinus; win32.keyMap['.'] = Fw::KeyPeriod; win32.keyMap['/'] = Fw::KeySlash; + */ win32.keyMap['0'] = Fw::Key0; win32.keyMap['1'] = Fw::Key1; @@ -178,6 +180,7 @@ void Platform::init(PlatformListener* platformListener, const char *appName) win32.keyMap['8'] = Fw::Key8; win32.keyMap['9'] = Fw::Key9; + /* win32.keyMap[':'] = Fw::KeyColon; win32.keyMap[';'] = Fw::KeySemicolon; win32.keyMap['<'] = Fw::KeyLess; @@ -185,6 +188,7 @@ void Platform::init(PlatformListener* platformListener, const char *appName) win32.keyMap['>'] = Fw::KeyGreater; win32.keyMap['?'] = Fw::KeyQuestion; win32.keyMap['@'] = Fw::KeyAtSign; + */ win32.keyMap['A'] = Fw::KeyA; win32.keyMap['B'] = Fw::KeyB; @@ -213,6 +217,7 @@ void Platform::init(PlatformListener* platformListener, const char *appName) win32.keyMap['Y'] = Fw::KeyY; win32.keyMap['Z'] = Fw::KeyZ; + /* win32.keyMap['['] = Fw::KeyLeftBracket; win32.keyMap['\\'] = Fw::KeyBackslash; win32.keyMap[']'] = Fw::KeyRightBracket; @@ -223,6 +228,7 @@ void Platform::init(PlatformListener* platformListener, const char *appName) win32.keyMap['|'] = Fw::KeyBar; win32.keyMap['}'] = Fw::KeyRightCurly; win32.keyMap['~'] = Fw::KeyTilde; + */ // keypad win32.keyMap[VK_ADD] = Fw::KeyPlus;