diff options
author | Torbjörn Andersson | 2006-03-26 06:22:41 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2006-03-26 06:22:41 +0000 |
commit | d8004bff5163e3c368ce91ba9124afde7360d093 (patch) | |
tree | 446f75f5eaaa862d51d1d6f49c2dd1aacac0ba73 /engines/sky | |
parent | 09b8869ef68e03429a70827d680131fe4ef1808a (diff) | |
download | scummvm-rg350-d8004bff5163e3c368ce91ba9124afde7360d093.tar.gz scummvm-rg350-d8004bff5163e3c368ce91ba9124afde7360d093.tar.bz2 scummvm-rg350-d8004bff5163e3c368ce91ba9124afde7360d093.zip |
Added support for mouse wheel scrolling in save/restore dialog.
svn-id: r21459
Diffstat (limited to 'engines/sky')
-rw-r--r-- | engines/sky/control.cpp | 19 | ||||
-rw-r--r-- | engines/sky/control.h | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/engines/sky/control.cpp b/engines/sky/control.cpp index c2aa5ed02f..59e7aa0e5e 100644 --- a/engines/sky/control.cpp +++ b/engines/sky/control.cpp @@ -820,6 +820,7 @@ bool Control::autoSaveExists(void) { uint16 Control::saveRestorePanel(bool allowSave) { _keyPressed = 0; + _mouseWheel = 0; buttonControl(NULL); _text->drawToScreen(WITH_MASK); // flush text restore buffer @@ -892,6 +893,18 @@ uint16 Control::saveRestorePanel(bool allowSave) { _keyPressed = 0; } + if (_mouseWheel) { + if (_mouseWheel < 0) + clickRes = shiftUp(SLOW); + else if (_mouseWheel > 0) + clickRes = shiftDown(SLOW); + _mouseWheel = 0; + if (clickRes == SHIFTED) { + _selectedGame = _firstText; + refreshNames = true; + } + } + bool haveButton = false; for (cnt = 0; cnt < lookListLen; cnt++) if (lookList[cnt]->isMouseOver(_mouseX, _mouseY)) { @@ -1548,6 +1561,12 @@ void Control::delay(unsigned int amount) { break; case OSystem::EVENT_RBUTTONDOWN: break; + case OSystem::EVENT_WHEELUP: + _mouseWheel = -1; + break; + case OSystem::EVENT_WHEELDOWN: + _mouseWheel = 1; + break; case OSystem::EVENT_QUIT: SkyEngine::_systemVars.quitGame = true; break; diff --git a/engines/sky/control.h b/engines/sky/control.h index d219dab749..edb1b7f9d0 100644 --- a/engines/sky/control.h +++ b/engines/sky/control.h @@ -242,6 +242,7 @@ private: int _mouseX, _mouseY; bool _mouseClicked; byte _keyPressed; + int _mouseWheel; struct { uint8 *controlPanel; |