summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-05-23 18:49:44 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-05-23 18:49:44 (GMT)
commitf41ab864ef837c169d3c98da1c98fceb3af1ecc8 (patch)
tree84754b18cb2ca5a554676cd5f1d14080d453bfe2 /src
parentf1953603c057813cf4093d73b6ecce96ae6c372b (diff)
downloadpowder-f41ab864ef837c169d3c98da1c98fceb3af1ecc8.zip
powder-f41ab864ef837c169d3c98da1c98fceb3af1ecc8.tar.gz
Fix slight issues when clicking on menu section buttons and missing isMouseInside in MouseEnter action for buttons
Diffstat (limited to 'src')
-rw-r--r--src/game/GameView.cpp4
-rw-r--r--src/interface/Button.cpp2
2 files changed, 6 insertions, 0 deletions
diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp
index ed8e6fe..9d97a33 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 a7aa387..9a59c01 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;