summaryrefslogtreecommitdiffstats
path: root/src/ui/key.cpp
diff options
context:
space:
mode:
authorerihel <erihel@gmail.com>2012-08-18 21:04:51 +0200
committererihel <erihel@gmail.com>2012-08-18 21:04:51 +0200
commit8d4a3ed57915af2acf8b3dcd9a8aec5a75806ca6 (patch)
treeffee78fc822604f9c5c3ab468c8da04862f31283 /src/ui/key.cpp
parent48ad79a03c12b923dfdb3795a2138445859cf779 (diff)
downloadcolobot-8d4a3ed57915af2acf8b3dcd9a8aec5a75806ca6.tar.gz
colobot-8d4a3ed57915af2acf8b3dcd9a8aec5a75806ca6.tar.bz2
colobot-8d4a3ed57915af2acf8b3dcd9a8aec5a75806ca6.zip
* wrong enum used for text alignment
* wrong event function used
Diffstat (limited to 'src/ui/key.cpp')
-rw-r--r--src/ui/key.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/ui/key.cpp b/src/ui/key.cpp
index de668bc..0cf74bc 100644
--- a/src/ui/key.cpp
+++ b/src/ui/key.cpp
@@ -59,12 +59,8 @@ CKey::~CKey()
bool CKey::Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg)
{
char name[100];
- Event event;
-
- if (eventMsg == EVENT_NULL) {
- m_event->GetEvent(event);
- eventMsg = event.type;
- }
+ if (eventMsg == EVENT_NULL)
+ eventMsg = GetUniqueEventType();
CControl::Create(pos, dim, icon, eventMsg);
GetResource(RES_EVENT, eventMsg, name);