aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/preagi_winnie.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2007-09-09 23:13:35 +0000
committerFilippos Karapetis2007-09-09 23:13:35 +0000
commita86ad9688a450b98686d6c643e3d28d047da867b (patch)
tree5a171e3880617e1a36c2fe8bef1fdba67947c684 /engines/agi/preagi_winnie.cpp
parentc5989f098dc1717b30c02db097cc584fe882eb87 (diff)
downloadscummvm-rg350-a86ad9688a450b98686d6c643e3d28d047da867b.tar.gz
scummvm-rg350-a86ad9688a450b98686d6c643e3d28d047da867b.tar.bz2
scummvm-rg350-a86ad9688a450b98686d6c643e3d28d047da867b.zip
It's now possible to move around in Winnie using the mouse, by clicking on the appropriate direction (north, south, east or west)
svn-id: r28883
Diffstat (limited to 'engines/agi/preagi_winnie.cpp')
-rw-r--r--engines/agi/preagi_winnie.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/engines/agi/preagi_winnie.cpp b/engines/agi/preagi_winnie.cpp
index df20627ab2..fc50c77f5e 100644
--- a/engines/agi/preagi_winnie.cpp
+++ b/engines/agi/preagi_winnie.cpp
@@ -760,6 +760,35 @@ void Winnie::getMenuSel(char *szMenu, int *iSel, int fCanSel[]) {
break;
case Common::EVENT_LBUTTONUP:
+ // Click to move
+ if (fCanSel[IDI_WTP_SEL_NORTH] && (event.mouse.x >= 20 && event.mouse.x <= (IDI_WTP_PIC_WIDTH + 10) * 2) &&
+ (event.mouse.y >= 0 && event.mouse.y <= 10)) {
+ *iSel = IDI_WTP_SEL_NORTH;
+ makeSel();
+ _vm->_gfx->setCursorPalette(false);
+ return;
+ } else if (fCanSel[IDI_WTP_SEL_SOUTH] && (event.mouse.x >= 20 && event.mouse.x <= (IDI_WTP_PIC_WIDTH + 10) * 2) &&
+ (event.mouse.y >= IDI_WTP_PIC_HEIGHT - 10 && event.mouse.y <= IDI_WTP_PIC_HEIGHT)) {
+ *iSel = IDI_WTP_SEL_SOUTH;
+ makeSel();
+ _vm->_gfx->setCursorPalette(false);
+ return;
+ } else if (fCanSel[IDI_WTP_SEL_WEST] && (event.mouse.y >= 0 && event.mouse.y <= IDI_WTP_PIC_HEIGHT) &&
+ (event.mouse.x >= 20 && event.mouse.x <= 30)) {
+ *iSel = IDI_WTP_SEL_WEST;
+ makeSel();
+ _vm->_gfx->setCursorPalette(false);
+ return;
+ } else if (fCanSel[IDI_WTP_SEL_EAST] && (event.mouse.y >= 0 && event.mouse.y <= IDI_WTP_PIC_HEIGHT) &&
+ (event.mouse.x >= IDI_WTP_PIC_WIDTH * 2 && event.mouse.x <= (IDI_WTP_PIC_WIDTH + 10) * 2)) {
+ *iSel = IDI_WTP_SEL_EAST;
+ makeSel();
+ _vm->_gfx->setCursorPalette(false);
+ return;
+ } else {
+ _vm->_gfx->setCursorPalette(false);
+ }
+
switch(*iSel) {
case IDI_WTP_SEL_OPT_1:
case IDI_WTP_SEL_OPT_2: