diff options
author | Willem Jan Palenstijn | 2015-05-07 23:35:36 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2015-05-07 23:35:36 +0200 |
commit | 57109ef0a8d30f15aa1fcef7d9d229fc9701f630 (patch) | |
tree | 230c0a7822875e9c41a4606fce54166d4dc37db0 /gui/Tooltip.h | |
parent | d9e93f8e015ce27a95090e854494c4b3f7d1c0d4 (diff) | |
parent | 04931d040085d77d031290fda57ca2c5dc486f54 (diff) | |
download | scummvm-rg350-57109ef0a8d30f15aa1fcef7d9d229fc9701f630.tar.gz scummvm-rg350-57109ef0a8d30f15aa1fcef7d9d229fc9701f630.tar.bz2 scummvm-rg350-57109ef0a8d30f15aa1fcef7d9d229fc9701f630.zip |
Merge branch 'master' into sherlock
Diffstat (limited to 'gui/Tooltip.h')
-rw-r--r-- | gui/Tooltip.h | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/gui/Tooltip.h b/gui/Tooltip.h index f83fc40966..58b6d8a429 100644 --- a/gui/Tooltip.h +++ b/gui/Tooltip.h @@ -32,6 +32,9 @@ namespace GUI { class Widget; class Tooltip : public Dialog { +private: + Dialog *_parent; + public: Tooltip(); @@ -39,12 +42,30 @@ public: void drawDialog(); protected: - virtual void handleMouseDown(int x, int y, int button, int clickCount) { close(); } - virtual void handleMouseUp(int x, int y, int button, int clickCount) { close(); } - virtual void handleMouseWheel(int x, int y, int direction) { close(); } - virtual void handleKeyDown(Common::KeyState state) { close(); } - virtual void handleKeyUp(Common::KeyState state) { close(); } - virtual void handleMouseMoved(int x, int y, int button) { close(); } + virtual void handleMouseDown(int x, int y, int button, int clickCount) { + close(); + _parent->handleMouseDown(x + (getAbsX() - _parent->getAbsX()), y + (getAbsY() - _parent->getAbsY()), button, clickCount); + } + virtual void handleMouseUp(int x, int y, int button, int clickCount) { + close(); + _parent->handleMouseUp(x + (getAbsX() - _parent->getAbsX()), y + (getAbsY() - _parent->getAbsY()), button, clickCount); + } + virtual void handleMouseWheel(int x, int y, int direction) { + close(); + _parent->handleMouseWheel(x + (getAbsX() - _parent->getAbsX()), y + (getAbsX() - _parent->getAbsX()), direction); + } + virtual void handleKeyDown(Common::KeyState state) { + close(); + _parent->handleKeyDown(state); + } + virtual void handleKeyUp(Common::KeyState state) { + close(); + _parent->handleKeyUp(state); + } + virtual void handleMouseMoved(int x, int y, int button) { + close(); + _parent->handleMouseMoved(x + (getAbsX() - _parent->getAbsX()), y + (getAbsY() - _parent->getAbsY()), button); + } int _maxWidth; int _xdelta, _ydelta; |