diff options
author | Ori Avtalion | 2016-04-06 17:22:02 +0300 |
---|---|---|
committer | Ori Avtalion | 2016-04-06 17:51:30 +0300 |
commit | be1fdf59bb80f963a4f97bfab49f59aca8d73d70 (patch) | |
tree | dcbcec9a6824d0ee4d0e53d9b19fca02b8b1c0b3 /gui/gui-manager.h | |
parent | 8fa543f58f251ef5c695f6c288ecd0303ec14144 (diff) | |
download | scummvm-rg350-be1fdf59bb80f963a4f97bfab49f59aca8d73d70.tar.gz scummvm-rg350-be1fdf59bb80f963a4f97bfab49f59aca8d73d70.tar.bz2 scummvm-rg350-be1fdf59bb80f963a4f97bfab49f59aca8d73d70.zip |
GUI: When dialogs gain focus, inform them of the current mouse position
Previously, they only reacted to the mouse position once it was moved.
This meant that if the cursor was on a button that just gained focus,
it did not highlight.
Fixes #7101.
Diffstat (limited to 'gui/gui-manager.h')
-rw-r--r-- | gui/gui-manager.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gui/gui-manager.h b/gui/gui-manager.h index 26c8d6def9..35779215b2 100644 --- a/gui/gui-manager.h +++ b/gui/gui-manager.h @@ -124,11 +124,12 @@ protected: bool _useStdCursor; // position and time of last mouse click (used to detect double clicks) - struct { + struct MousePos { + MousePos() : x(-1), y(-1), count(0) { time = 0; } int16 x, y; // Position of mouse when the click occurred uint32 time; // Time int count; // How often was it already pressed? - } _lastClick, _lastMousePosition; + } _lastClick, _lastMousePosition, _globalMousePosition; // mouse cursor state int _cursorAnimateCounter; @@ -155,6 +156,9 @@ protected: Dialog *getTopDialog() const; void screenChange(); + + void giveFocusToDialog(Dialog *dialog); + void setLastMousePos(int16 x, int16 y); }; } // End of namespace GUI |