mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 04:28:37 +00:00
handle mouse wheel in Journal screen
svn-id: r11758
This commit is contained in:
parent
a3310a5de9
commit
dae474e86d
@ -70,6 +70,12 @@ void Journal::use() {
|
||||
case OSystem::EVENT_LBUTTONDOWN:
|
||||
handleMouseDown(event.mouse.x, event.mouse.y);
|
||||
break;
|
||||
case OSystem::EVENT_WHEELUP:
|
||||
handleMouseWheel(-1);
|
||||
break;
|
||||
case OSystem::EVENT_WHEELDOWN:
|
||||
handleMouseWheel(1);
|
||||
break;
|
||||
case OSystem::EVENT_QUIT:
|
||||
system->quit();
|
||||
break;
|
||||
@ -356,6 +362,21 @@ void Journal::handleYesNoMode(int16 zoneNum) {
|
||||
}
|
||||
|
||||
|
||||
void Journal::handleMouseWheel(int inc) {
|
||||
|
||||
if (_mode == M_NORMAL) {
|
||||
int curSave = _currentSavePage * SAVE_PER_PAGE + _currentSaveSlot + inc;
|
||||
if (curSave >= 0 && curSave < SAVE_PER_PAGE * 10) {
|
||||
_currentSavePage = curSave / SAVE_PER_PAGE;
|
||||
_currentSaveSlot = curSave % SAVE_PER_PAGE;
|
||||
drawSaveDescriptions();
|
||||
drawSaveSlot();
|
||||
update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Journal::handleMouseDown(int x, int y) {
|
||||
|
||||
int16 zone = _vm->logic()->zoneIn(ZONE_ROOM, x, y);
|
||||
|
@ -132,6 +132,7 @@ private:
|
||||
void handleInfoBoxMode(int16 zoneNum);
|
||||
void handleYesNoMode(int16 zoneNum);
|
||||
|
||||
void handleMouseWheel(int inc);
|
||||
void handleMouseDown(int x, int y);
|
||||
void handleKeyDown(uint16 ascii, int keycode);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user