diff options
| author | Eugene Sandulenko | 2012-03-17 03:46:46 -0700 |
|---|---|---|
| committer | Eugene Sandulenko | 2012-03-17 03:46:46 -0700 |
| commit | 56252909f5bebfa9cfd43cf092effb0111fdabef (patch) | |
| tree | efcf99fefc8b019cd07c119a9e15ccf3be06a2fe /gui | |
| parent | 5ae2543795433513e68339b16e0783d4b3295204 (diff) | |
| parent | c0a215282d12872cf32fb24f9067216c0f869b96 (diff) | |
| download | scummvm-rg350-56252909f5bebfa9cfd43cf092effb0111fdabef.tar.gz scummvm-rg350-56252909f5bebfa9cfd43cf092effb0111fdabef.tar.bz2 scummvm-rg350-56252909f5bebfa9cfd43cf092effb0111fdabef.zip | |
Merge pull request #202 from tsoliman/keymapper-nonkey-inputs
KEYMAPPER: Add Gesture Support
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/dialog.cpp | 7 | ||||
| -rw-r--r-- | gui/dialog.h | 9 | ||||
| -rw-r--r-- | gui/gui-manager.cpp | 3 |
3 files changed, 19 insertions, 0 deletions
diff --git a/gui/dialog.cpp b/gui/dialog.cpp index fd15ba5e09..2201e83ca5 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -21,6 +21,10 @@ #include "common/rect.h" +#ifdef ENABLE_KEYMAPPER +#include "common/events.h" +#endif + #include "gui/gui-manager.h" #include "gui/dialog.h" #include "gui/widget.h" @@ -314,6 +318,9 @@ void Dialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { } } +#ifdef ENABLE_KEYMAPPER +void Dialog::handleOtherEvent(Common::Event evt) { } +#endif /* * Determine the widget at location (x,y) if any. Assumes the coordinates are * in the local coordinate system, i.e. relative to the top left of the dialog. diff --git a/gui/dialog.h b/gui/dialog.h index a324450996..f5a5f94a68 100644 --- a/gui/dialog.h +++ b/gui/dialog.h @@ -29,6 +29,12 @@ #include "gui/object.h" #include "gui/ThemeEngine.h" +#ifdef ENABLE_KEYMAPPER +namespace Common { +struct Event; +} +#endif + namespace GUI { class Widget; @@ -82,6 +88,9 @@ protected: virtual void handleKeyUp(Common::KeyState state); virtual void handleMouseMoved(int x, int y, int button); virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data); +#ifdef ENABLE_KEYMAPPER + virtual void handleOtherEvent(Common::Event evt); +#endif Widget *findWidget(int x, int y); // Find the widget at pos x,y if any Widget *findWidget(const char *name); diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp index 4fa60bfe07..ffecd928bc 100644 --- a/gui/gui-manager.cpp +++ b/gui/gui-manager.cpp @@ -366,6 +366,9 @@ void GuiManager::runLoop() { screenChange(); break; default: +#ifdef ENABLE_KEYMAPPER + activeDialog->handleOtherEvent(event); +#endif break; } |
