aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/gui.cpp
diff options
context:
space:
mode:
authorOystein Eftevaag2006-03-19 05:55:26 +0000
committerOystein Eftevaag2006-03-19 05:55:26 +0000
commite636a25a3313da26225e0f5518a67f54092e78e1 (patch)
tree0aa02962d3e408c10b69b7d666d66ad0b1695f7a /engines/kyra/gui.cpp
parent6632a4df53bd6cd94d85057ceae10f14108a67e4 (diff)
downloadscummvm-rg350-e636a25a3313da26225e0f5518a67f54092e78e1.tar.gz
scummvm-rg350-e636a25a3313da26225e0f5518a67f54092e78e1.tar.bz2
scummvm-rg350-e636a25a3313da26225e0f5518a67f54092e78e1.zip
Adds button press animations to the menu, and resets the cursor when the Dialog of Death pops up. Also, mouse clicks are now registered on button up instead of button down, as in the original
svn-id: r21377
Diffstat (limited to 'engines/kyra/gui.cpp')
-rw-r--r--engines/kyra/gui.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp
index b386fb65da..d201d0fcd3 100644
--- a/engines/kyra/gui.cpp
+++ b/engines/kyra/gui.cpp
@@ -251,7 +251,9 @@ void KyraEngine::processButtonList(Button *list) {
if (_mousePressFlag) {
if (!(list->flags2 & 1)) {
list->flags2 |= 1;
+ list->flags2 |= 4;
processButton(list);
+ _screen->updateScreen();
}
} else {
if (list->flags2 & 1) {
@@ -276,6 +278,11 @@ void KyraEngine::processButtonList(Button *list) {
list->flags2 &= 0xFFFE;
processButton(list);
}
+ if (list->flags2 & 4) {
+ list->flags2 &= 0xFFFB;
+ processButton(list);
+ _screen->updateScreen();
+ }
list = list->nextButton;
continue;
}
@@ -353,8 +360,6 @@ void KyraEngine::processMenuButton(Button *button) {
if (!_displayMenu)
return;
- //_screen->hideMouse();
-
if ( !button || (button->flags & 8))
return;
@@ -374,7 +379,6 @@ void KyraEngine::processMenuButton(Button *button) {
processButton(button);
- //_screen->showMouse();
}
int KyraEngine::drawBoxCallback(Button *button) {
@@ -426,7 +430,8 @@ int KyraEngine::buttonMenuCallback(Button *caller) {
_menuRestoreScreen = true;
_keyboardEvent.pending = 0;
_keyboardEvent.repeat = 0;
-
+ _mousePressFlag = false;
+
_toplevelMenu = 0;
if (_menuDirectlyToLoad)
gui_loadGameMenu(0);
@@ -569,16 +574,18 @@ void KyraEngine::gui_getInput() {
OSystem::Event event;
uint32 now = _system->getMillis();
- _mousePressFlag = false;
_mouseWheel = 0;
while (_system->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_QUIT:
quitGame();
break;
- case OSystem::EVENT_LBUTTONUP:
+ case OSystem::EVENT_LBUTTONDOWN:
_mousePressFlag = true;
break;
+ case OSystem::EVENT_LBUTTONUP:
+ _mousePressFlag = false;
+ break;
case OSystem::EVENT_MOUSEMOVE:
_mouseX = event.mouse.x;
_mouseY = event.mouse.y;