From f41ab864ef837c169d3c98da1c98fceb3af1ecc8 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 23 May 2012 19:49:44 +0100 Subject: [PATCH] Fix slight issues when clicking on menu section buttons and missing isMouseInside in MouseEnter action for buttons --- src/game/GameView.cpp | 4 ++++ src/interface/Button.cpp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index ed8e6fe28..9d97a3322 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -242,6 +242,10 @@ public: { v->c->SetActiveMenu(menu); } + void ActionCallback(ui::Button * sender) + { + MouseEnterCallback(sender); + } }; class GameView::ToolAction: public ui::ButtonAction diff --git a/src/interface/Button.cpp b/src/interface/Button.cpp index a7aa38722..9a59c019c 100644 --- a/src/interface/Button.cpp +++ b/src/interface/Button.cpp @@ -136,12 +136,14 @@ void Button::OnMouseClick(int x, int y, unsigned int button) void Button::OnMouseEnter(int x, int y) { + isMouseInside = true; if(!Enabled) return; if(actionCallback) actionCallback->MouseEnterCallback(this); } + void Button::OnMouseLeave(int x, int y) { isMouseInside = false;