diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2011-06-14 18:49:11 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2011-06-14 18:49:11 +0200 |
commit | bef4a4cebb599aab2704f509e8652ad5da2f84d2 (patch) | |
tree | 8b7ee1b6accbafabc5fe470487e96cbb1fdd7de4 | |
parent | 9a56f664df9478e2caf79a5957a34b39eddc28e2 (diff) |
Temporary hack to get UI input working on win32 builds.
-rw-r--r-- | gui.cpp | 10 | ||||
-rw-r--r-- | scene.cpp | 9 |
2 files changed, 19 insertions, 0 deletions
@@ -110,11 +110,21 @@ bool ConsoleWindow::keydown(const EventArgs& e) { const KeyEventArgs& ke = static_cast<const KeyEventArgs&>(e); switch(ke.scancode) { // enter + // TODO: FIX! +#ifdef WIN32 + case 28: +#else case 36: +#endif handle_input(); break; // backspace + // TODO: FIX! +#ifdef WIN32 + case 14: +#else case 22: +#endif erase_editbox_text(); break; default: @@ -162,7 +162,12 @@ void Scene::events() { running = false; break; case SDL_KEYDOWN: + // TODO: FIX! +#ifdef WIN32 + if(console->showing() && event.key.keysym.sym != SDLK_BACKQUOTE) { +#else if(console->showing() && event.key.keysym.sym != 124) { +#endif CEGUI::System::getSingleton().injectKeyDown(event.key.keysym.scancode); if(CEGUI::System::getSingleton().injectChar(event.key.keysym.unicode)) break; @@ -213,7 +218,11 @@ void Scene::events() { tool = new RaiseTool(terrain); break; // TODO: change/make configurable +#ifdef WIN32 + case SDLK_BACKQUOTE: +#else case 124: +#endif if(console->showing()) { console->hide(); dialog = false; |