aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-02-04 18:59:36 +0100
committerEugene Sandulenko2016-02-14 17:13:01 +0100
commit06ba17395d0bbd3a099d692a6e1356b4c67f1d8b (patch)
tree4c40e077e952c31e677804ab27d7e9f74322bcdf
parent8ee5d6e9d1cda74d4ad35ca4d19a4d36996f11c4 (diff)
downloadscummvm-rg350-06ba17395d0bbd3a099d692a6e1356b4c67f1d8b.tar.gz
scummvm-rg350-06ba17395d0bbd3a099d692a6e1356b4c67f1d8b.tar.bz2
scummvm-rg350-06ba17395d0bbd3a099d692a6e1356b4c67f1d8b.zip
WAGE: Fix cursors during dialogs
-rw-r--r--engines/wage/dialog.cpp3
-rw-r--r--engines/wage/gui.cpp8
-rw-r--r--engines/wage/gui.h2
3 files changed, 13 insertions, 0 deletions
diff --git a/engines/wage/dialog.cpp b/engines/wage/dialog.cpp
index 3cee886473..d98af304cb 100644
--- a/engines/wage/dialog.cpp
+++ b/engines/wage/dialog.cpp
@@ -145,6 +145,7 @@ int Dialog::run() {
Common::Rect r(_bbox);
_tempSurface.copyRectToSurface(_gui->_screen.getBasePtr(_bbox.left, _bbox.top), _gui->_screen.pitch, 0, 0, _bbox.width() + 1, _bbox.height() + 1);
+ _gui->pushArrowCursor();
while (!shouldQuit) {
Common::Event event;
@@ -188,6 +189,8 @@ int Dialog::run() {
_gui->_screen.copyRectToSurface(_tempSurface.getBasePtr(0, 0), _tempSurface.pitch, _bbox.left, _bbox.top, _bbox.width() + 1, _bbox.height() + 1);
g_system->copyRectToScreen(_gui->_screen.getBasePtr(r.left, r.top), _gui->_screen.pitch, r.left, r.top, r.width() + 1, r.height() + 1);
+ _gui->popCursor();
+
return _pressedButton;
}
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp
index 2dc2e69977..ef05607770 100644
--- a/engines/wage/gui.cpp
+++ b/engines/wage/gui.cpp
@@ -681,6 +681,14 @@ void Gui::mouseMove(int x, int y) {
}
}
+void Gui::pushArrowCursor() {
+ CursorMan.pushCursor(macCursorArrow, 11, 16, 1, 1, 3);
+}
+
+void Gui::popCursor() {
+ CursorMan.popCursor();
+}
+
Designed *Gui::mouseUp(int x, int y) {
if (_menu->_menuActivated) {
if (_menu->mouseRelease(x, y)) {
diff --git a/engines/wage/gui.h b/engines/wage/gui.h
index 6adba2721c..4f3b0f9aa0 100644
--- a/engines/wage/gui.h
+++ b/engines/wage/gui.h
@@ -101,6 +101,8 @@ public:
void regenCommandsMenu();
void regenWeaponsMenu();
void processMenuShortCut(byte flags, uint16 ascii);
+ void pushArrowCursor();
+ void popCursor();
private:
void paintBorder(Graphics::Surface *g, Common::Rect &r, WindowType windowType);