[Scummvm-cvs-logs] CVS: scummvm/queen journal.h,1.4,1.5 journal.cpp,1.9,1.10
Gregory Montoir
cyx at users.sourceforge.net
Fri Dec 19 01:22:01 CET 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sword1 sound.cpp,1.7,1.8 sound.h,1.3,1.4
- Next message: [Scummvm-cvs-logs] CVS: scummvm/queen graphics.cpp,1.56,1.57 graphics.h,1.47,1.48 logic.cpp,1.135,1.136 queen.cpp,1.56,1.57 queen.h,1.20,1.21 xref.txt,1.48,1.49
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv1505
Modified Files:
journal.h journal.cpp
Log Message:
handle mouse wheel in Journal screen
Index: journal.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/journal.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- journal.h 11 Dec 2003 22:16:35 -0000 1.4
+++ journal.h 19 Dec 2003 09:21:02 -0000 1.5
@@ -132,6 +132,7 @@
void handleInfoBoxMode(int16 zoneNum);
void handleYesNoMode(int16 zoneNum);
+ void handleMouseWheel(int inc);
void handleMouseDown(int x, int y);
void handleKeyDown(uint16 ascii, int keycode);
Index: journal.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/journal.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- journal.cpp 11 Dec 2003 22:16:35 -0000 1.9
+++ journal.cpp 19 Dec 2003 09:21:02 -0000 1.10
@@ -70,6 +70,12 @@
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;
@@ -352,6 +358,21 @@
}
else if (zoneNum == ZN_NO) {
exitYesNoMode();
+ }
+}
+
+
+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();
+ }
}
}
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sword1 sound.cpp,1.7,1.8 sound.h,1.3,1.4
- Next message: [Scummvm-cvs-logs] CVS: scummvm/queen graphics.cpp,1.56,1.57 graphics.h,1.47,1.48 logic.cpp,1.135,1.136 queen.cpp,1.56,1.57 queen.h,1.20,1.21 xref.txt,1.48,1.49
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list