diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-09-22 00:38:17 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-09-22 00:38:17 +0200 |
commit | 0ff419560d5a567afaa0294968cc1f5b5e6b597b (patch) | |
tree | 03edeac0b7850348b9b910e0d39dd88a477afd75 /src/ui/button.cpp | |
parent | 15ff1d512b9e103396144bec1cd8004ecf4f7f9c (diff) | |
download | colobot-0ff419560d5a567afaa0294968cc1f5b5e6b597b.tar.gz colobot-0ff419560d5a567afaa0294968cc1f5b5e6b597b.tar.bz2 colobot-0ff419560d5a567afaa0294968cc1f5b5e6b597b.zip |
Event fixes & refactoring
- added new state tracking to Event
- removed old fields from Event
- fixed some issues with Events and fps counter
Diffstat (limited to 'src/ui/button.cpp')
-rw-r--r-- | src/ui/button.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/button.cpp b/src/ui/button.cpp index d98e676..e3dbc30 100644 --- a/src/ui/button.cpp +++ b/src/ui/button.cpp @@ -101,11 +101,11 @@ bool CButton::EventProcess(const Event &event) } if ( event.type == EVENT_MOUSE_BUTTON_DOWN && - event.mouseButton.button == 1 && + event.mouseButton.button == MOUSE_BUTTON_LEFT && (m_state & STATE_VISIBLE) && (m_state & STATE_ENABLE) ) { - if ( CControl::Detect(event.mouseButton.pos) ) + if ( CControl::Detect(event.mousePos) ) { m_bCapture = true; m_repeat = DELAY1; @@ -125,10 +125,10 @@ bool CButton::EventProcess(const Event &event) } if ( event.type == EVENT_MOUSE_BUTTON_UP && //left - event.mouseButton.button == 1 && + event.mouseButton.button == MOUSE_BUTTON_LEFT && m_bCapture ) { - if ( CControl::Detect(event.mouseButton.pos) ) + if ( CControl::Detect(event.mousePos) ) { if ( !m_bImmediat && !m_bRepeat ) { |