diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-14 11:15:28 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-14 11:15:28 (GMT) |
| commit | fe59ec9659a58bb91fd1d6c7babb26e5584f7cc3 (patch) | |
| tree | c941e47626f17445fec43278895c141626efc994 /src/interface/Button.cpp | |
| parent | b05a847e967f5223b287e85f06b2be382b89fe19 (diff) | |
| download | powder-fe59ec9659a58bb91fd1d6c7babb26e5584f7cc3.zip powder-fe59ec9659a58bb91fd1d6c7babb26e5584f7cc3.tar.gz | |
Only call button actions if the mouse is released inside the button. Fixes #96
Diffstat (limited to 'src/interface/Button.cpp')
| -rw-r--r-- | src/interface/Button.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/interface/Button.cpp b/src/interface/Button.cpp index d5cc382..c6ebd79 100644 --- a/src/interface/Button.cpp +++ b/src/interface/Button.cpp @@ -142,7 +142,7 @@ void Button::Draw(const Point& screenPos) } } -void Button::OnMouseUp(int x, int y, unsigned int button) +void Button::OnMouseUnclick(int x, int y, unsigned int button) { if(button != 1) { @@ -183,6 +183,7 @@ void Button::OnMouseEnter(int x, int y) void Button::OnMouseLeave(int x, int y) { isMouseInside = false; + isButtonDown = false; } void Button::DoAction() |
