diff options
Diffstat (limited to 'engines/agi')
-rw-r--r-- | engines/agi/preagi_winnie.cpp | 29 |
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: |