diff options
| author | jacob1 <jfu614@gmail.com> | 2013-03-06 17:05:59 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2013-03-06 17:05:59 (GMT) |
| commit | 037618e6f8e6a37574f7ef8ffd90e490fb0ea137 (patch) | |
| tree | d80246d31a26aee7735a566bccc8ce9e8e4e305d /src/interface/Button.cpp | |
| parent | ad951eb9af20cd1a784fab39c41ade1c19dff2ca (diff) | |
| download | powder-037618e6f8e6a37574f7ef8ffd90e490fb0ea137.zip powder-037618e6f8e6a37574f7ef8ffd90e490fb0ea137.tar.gz | |
remove auto generated comments from all files, fix some missing tabs, remove unused variables from config.h
Diffstat (limited to 'src/interface/Button.cpp')
| -rw-r--r-- | src/interface/Button.cpp | 43 |
1 files changed, 18 insertions, 25 deletions
diff --git a/src/interface/Button.cpp b/src/interface/Button.cpp index 95de0e8..a2ecf8f 100644 --- a/src/interface/Button.cpp +++ b/src/interface/Button.cpp @@ -1,10 +1,3 @@ -/* - * Button.cpp - * - * Created on: Jan 8, 2012 - * Author: Simon - */ - #include <iostream> #include "interface/Button.h" #include "graphics/Graphics.h" @@ -156,21 +149,21 @@ void Button::Draw(const Point& screenPos) void Button::OnMouseUnclick(int x, int y, unsigned int button) { - if(button == 1) - { - if(isButtonDown) + if(button == 1) + { + if(isButtonDown) { - isButtonDown = false; + isButtonDown = false; DoAction(); } - } - else if(button == 3) - { - if(isAltButtonDown) - { - isAltButtonDown = false; - DoAltAction(); - } + } + else if(button == 3) + { + if(isAltButtonDown) + { + isAltButtonDown = false; + DoAltAction(); + } } } @@ -178,8 +171,8 @@ void Button::OnMouseClick(int x, int y, unsigned int button) { if(!Enabled) return; - if(button == 1) - { + if(button == 1) + { if(isTogglable) { toggle = !toggle; @@ -187,14 +180,14 @@ void Button::OnMouseClick(int x, int y, unsigned int button) isButtonDown = true; } else if(button == 3) - { + { isAltButtonDown = true; } } void Button::OnMouseEnter(int x, int y) { - isMouseInside = true; + isMouseInside = true; if(!Enabled) return; if(actionCallback) @@ -208,8 +201,8 @@ void Button::OnMouseEnter(int x, int y) void Button::OnMouseLeave(int x, int y) { - isMouseInside = false; - isButtonDown = false; + isMouseInside = false; + isButtonDown = false; } void Button::DoAction() |
