diff options
| author | Eugene Sandulenko | 2009-01-11 00:20:27 +0000 |
|---|---|---|
| committer | Eugene Sandulenko | 2009-01-11 00:20:27 +0000 |
| commit | 83972e2001e0654e057b5a4930cd2cbc05165786 (patch) | |
| tree | 1137fef4016651c2ad56aa44024649c80d0a939f /gui | |
| parent | 326df55debb696f73c33450569af4a6d0c60b0fd (diff) | |
| parent | fe39d4f5075cc723945ca813142d02983069d0d5 (diff) | |
| download | scummvm-rg350-83972e2001e0654e057b5a4930cd2cbc05165786.tar.gz scummvm-rg350-83972e2001e0654e057b5a4930cd2cbc05165786.tar.bz2 scummvm-rg350-83972e2001e0654e057b5a4930cd2cbc05165786.zip | |
Merge in Virtual Keybpard & KeyMapper branch,
- Merge is perfromed in order to not let rotting the code
- Makefile modifications were avoided
Stuff to resolve:
- Circular dependency of common/vkeybd from graphics/
- Make it compilable (?)
- Add some keyboards
- Decide on the key bindings
svn-id: r35813
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/GuiManager.cpp | 10 | ||||
| -rw-r--r-- | gui/dialog.cpp | 10 |
2 files changed, 17 insertions, 3 deletions
diff --git a/gui/GuiManager.cpp b/gui/GuiManager.cpp index cebb48a00e..396491fc80 100644 --- a/gui/GuiManager.cpp +++ b/gui/GuiManager.cpp @@ -28,6 +28,8 @@ #include "common/config-manager.h" #include "common/algorithm.h" +#include "backends/keymapper/keymapper.h" + #include "gui/GuiManager.h" #include "gui/dialog.h" #include "gui/ThemeEngine.h" @@ -200,6 +202,10 @@ void GuiManager::runLoop() { uint32 lastRedraw = 0; const uint32 waitTime = 1000 / 45; +#ifdef ENABLE_KEYMAPPER + eventMan->getKeymapper()->pushKeymap("gui"); +#endif + while (!_dialogStack.empty() && activeDialog == getTopDialog()) { redraw(); @@ -306,6 +312,10 @@ void GuiManager::runLoop() { _system->delayMillis(10); } +#ifdef ENABLE_KEYMAPPER + eventMan->getKeymapper()->popKeymap(); +#endif + if (didSaveState) { _theme->disable(); restoreState(); diff --git a/gui/dialog.cpp b/gui/dialog.cpp index d2c4dedb74..bca1be3d0e 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -81,12 +81,12 @@ int Dialog::runModal() { } void Dialog::open() { - Widget *w = _firstWidget; _result = 0; _visible = true; g_gui.openDialog(this); + Widget *w = _firstWidget; // Search for the first objects that wantsFocus() (if any) and give it the focus while (w && !w->wantsFocus()) { w = w->_next; @@ -343,14 +343,18 @@ void Dialog::removeWidget(Widget *del) { Widget *w = _firstWidget; if (del == _firstWidget) { - _firstWidget = _firstWidget->_next; + Widget *del_next = del->_next; + del->_next = 0; + _firstWidget = del_next; return; } w = _firstWidget; while (w) { if (w->_next == del) { - w->_next = w->_next->_next; + Widget *del_next = del->_next; + del->_next = 0; + w->_next = del_next; return; } w = w->_next; |
