diff options
author | Michał Konopacki <konopacki.m@gmail.com> | 2012-09-19 22:17:28 +0200 |
---|---|---|
committer | Michał Konopacki <konopacki.m@gmail.com> | 2012-09-19 22:17:28 +0200 |
commit | 57d33d79ea570773d84ad81d4a61f50e079979ef (patch) | |
tree | 562be3e3ee4a5650fc990baee6403c911ea6f89f /src/ui/key.cpp | |
parent | 1a79137e904eb07c17df2596e6b8aa9310ff22bd (diff) | |
download | colobot-57d33d79ea570773d84ad81d4a61f50e079979ef.tar.gz colobot-57d33d79ea570773d84ad81d4a61f50e079979ef.tar.bz2 colobot-57d33d79ea570773d84ad81d4a61f50e079979ef.zip |
Changes in Ui, solves part of #47
Diffstat (limited to 'src/ui/key.cpp')
-rw-r--r-- | src/ui/key.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ui/key.cpp b/src/ui/key.cpp index 0ba3a6f..2e627bd 100644 --- a/src/ui/key.cpp +++ b/src/ui/key.cpp @@ -83,17 +83,17 @@ bool CKey::EventProcess(const Event &event) if (event.type == EVENT_MOUSE_BUTTON_DOWN) { if (event.mouseButton.button == 1) // left - m_bCatch = Detect(event.pos); + m_bCatch = Detect(event.mouseButton.pos); } - if (event.type == EVENT_MOUSE_BUTTON_DOWN && m_bCatch) { + if (event.type == EVENT_KEY_DOWN && m_bCatch) { m_bCatch = false; - if ( TestKey(event.param) ) { // impossible ? + if ( TestKey(event.key.key) ) { // impossible ? m_sound->Play(SOUND_TZOING); } else { - if ( event.param == m_key[0] || event.param == m_key[1] ) { - m_key[0] = event.param; + if ( event.key.key == m_key[0] || event.key.key == m_key[1] ) { + m_key[0] = event.key.key; m_key[1] = 0; } else { m_key[1] = m_key[0]; @@ -118,7 +118,7 @@ bool CKey::TestKey(int key) { if ( key == KEY(PAUSE) || key == KEY(PRINT) ) return true; // blocked key - /* TODO: input bindings + /* TODO: input bindings for (int i = 0; i < 20; i++) { for (int j = 0; j < 2; j++) { if (key == m_app->GetKey(i, j) ) // key used? @@ -129,7 +129,7 @@ bool CKey::TestKey(int key) m_app->SetKey(i, 0, m_app->GetKey(i, 1)); // shift m_app->SetKey(i, 1, 0); } - }*/ + } */ return false; // not used } |