summaryrefslogtreecommitdiffstats
path: root/src/ui/key.cpp
diff options
context:
space:
mode:
authorerihel <erihel@gmail.com>2012-08-17 23:03:52 +0200
committererihel <erihel@gmail.com>2012-08-17 23:03:52 +0200
commitea6269c4110282a3e7c05bec9c7f17ffd1bd5191 (patch)
tree712508692172671a06e6453908704b1c8f7ace94 /src/ui/key.cpp
parent6ff8706d041d0b204734eabcfc4f6acf39cfbbf2 (diff)
downloadcolobot-ea6269c4110282a3e7c05bec9c7f17ffd1bd5191.tar.gz
colobot-ea6269c4110282a3e7c05bec9c7f17ffd1bd5191.tar.bz2
colobot-ea6269c4110282a3e7c05bec9c7f17ffd1bd5191.zip
* ui/key.cpp compiles
* csoundinterface to ccontrol
Diffstat (limited to 'src/ui/key.cpp')
-rw-r--r--src/ui/key.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ui/key.cpp b/src/ui/key.cpp
index 0d73ed0..de668bc 100644
--- a/src/ui/key.cpp
+++ b/src/ui/key.cpp
@@ -20,6 +20,7 @@
#include <ui/key.h>
+namespace Ui {
void GetKeyName(char *name, int key)
{
@@ -90,12 +91,9 @@ bool CKey::EventProcess(const Event &event)
if (event.type == EVENT_MOUSE_BUTTON_DOWN && m_bCatch) {
m_bCatch = false;
- if ( TestKey(event.param) ) // impossible ?
- {
+ if ( TestKey(event.param) ) { // impossible ?
m_sound->Play(SOUND_TZOING);
- }
- else
- {
+ } else {
if ( event.param == m_key[0] || event.param == m_key[1] ) {
m_key[0] = event.param;
m_key[1] = 0;
@@ -120,7 +118,7 @@ bool CKey::EventProcess(const Event &event)
bool CKey::TestKey(int key)
{
- if ( key == VK_PAUSE || key == VK_SNAPSHOT ) return true; // blocked key
+ if ( key == KEY(PAUSE) || key == KEY(PRINT) ) return true; // blocked key
for (int i = 0; i < 20; i++) {
for (int j = 0; j < 2; j++) {
@@ -237,3 +235,4 @@ int CKey::GetKey(int option)
return m_key[option];
}
+}