GUI: Fix scrolling in launcher and GMM tabs
This should address the #13106 issue and similar It makes widgets, who don't implement handleMouseWheel(), call the handleMouseWheel() of their parent by default Logic is borrowed from how widgets forward unhandle commands to their parent in handleCommand()
This commit is contained in:
parent
9a016f5ad0
commit
325260f1ae
2 changed files with 2 additions and 1 deletions
|
@ -103,6 +103,7 @@ public:
|
|||
*/
|
||||
virtual Common::Rect getClipRect() const;
|
||||
|
||||
virtual void handleMouseWheel(int x, int y, int direction) {};
|
||||
protected:
|
||||
virtual void releaseFocus() = 0;
|
||||
};
|
||||
|
|
|
@ -138,7 +138,7 @@ public:
|
|||
virtual void handleMouseEntered(int button) {}
|
||||
virtual void handleMouseLeft(int button) {}
|
||||
virtual void handleMouseMoved(int x, int y, int button) {}
|
||||
virtual void handleMouseWheel(int x, int y, int direction) {}
|
||||
void handleMouseWheel(int x, int y, int direction) override { assert(_boss); _boss->handleMouseWheel(x, y, direction); }
|
||||
virtual bool handleKeyDown(Common::KeyState state) { return false; } // Return true if the event was handled
|
||||
virtual bool handleKeyUp(Common::KeyState state) { return false; } // Return true if the event was handled
|
||||
virtual void handleTickle() {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue