diff options
Diffstat (limited to 'src/client/input.cc')
-rw-r--r-- | src/client/input.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/client/input.cc b/src/client/input.cc index d30a97e..96cd032 100644 --- a/src/client/input.cc +++ b/src/client/input.cc @@ -34,7 +34,8 @@ void Input::handle_keyreleased(SDL_keysym* keysym) switch( keysym->sym ) { case '`': case '~': - console.toggle(); + //console.toggle(); + core::cmd << "con_toggle" << std::endl; break; case SDLK_SPACE: camera.nextmode(); @@ -88,10 +89,14 @@ void Input::process() while( SDL_PollEvent( &event ) ) { switch( event.type ) { case SDL_KEYDOWN: - handle_keypressed( &event.key.keysym ); + if (!console.visible) + handle_keypressed( &event.key.keysym ); break; case SDL_KEYUP: - handle_keyreleased( &event.key.keysym ); + if (console.visible) + console.handle_keyreleased( &event.key.keysym ); + else + handle_keyreleased( &event.key.keysym ); break; case SDL_QUIT: client::application.shutdown(); |