summaryrefslogtreecommitdiff
path: root/src/gui/interface
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-05-15 03:50:26 (GMT)
committer jacob1 <jfu614@gmail.com>2013-05-15 03:50:26 (GMT)
commit94d21a1679749df49342903545192254a27f8ffc (patch)
tree81d4f9771b4821ad29b0dee0240febcb4e08280e /src/gui/interface
parentab3675d6eea1ce6eeeac713ed44f5cb591ff820f (diff)
downloadpowder-94d21a1679749df49342903545192254a27f8ffc.zip
powder-94d21a1679749df49342903545192254a27f8ffc.tar.gz
when called with no arguments, some tpt. functions will act as get functions (unfinished)
Also, redo some menu stuff to use int's instead of Menu *s, and fix bug with toggleable buttons being toggled without triggering their actions
Diffstat (limited to 'src/gui/interface')
-rw-r--r--src/gui/interface/Button.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/interface/Button.cpp b/src/gui/interface/Button.cpp
index 37ef22d..71ec499 100644
--- a/src/gui/interface/Button.cpp
+++ b/src/gui/interface/Button.cpp
@@ -153,6 +153,10 @@ void Button::OnMouseUnclick(int x, int y, unsigned int button)
{
if(isButtonDown)
{
+ if(isTogglable)
+ {
+ toggle = !toggle;
+ }
isButtonDown = false;
DoAction();
}
@@ -173,10 +177,6 @@ void Button::OnMouseClick(int x, int y, unsigned int button)
return;
if(button == 1)
{
- if(isTogglable)
- {
- toggle = !toggle;
- }
isButtonDown = true;
}
else if(button == 3)