diff options
author | Stijn Buys <ingar@osirion.org> | 2008-05-10 11:03:38 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-05-10 11:03:38 +0000 |
commit | 3499e2422aa1c280f7965c793983ad9302288043 (patch) | |
tree | c65ed82c8349d57da836b123459adc86278a1b72 /src | |
parent | 930db4020b9af2ccd999cb3a8c980cc9d527f8cf (diff) |
binds ESC to console
Diffstat (limited to 'src')
-rw-r--r-- | src/client/input.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/input.cc b/src/client/input.cc index fa23c1a..d8639cc 100644 --- a/src/client/input.cc +++ b/src/client/input.cc @@ -231,7 +231,9 @@ void frame(float seconds) keyreleased(event.key.keysym); break; case SDL_KEYDOWN: - if (event.key.keysym.sym == '`' || event.key.keysym.sym == '~') { + if (chat::visible() && !console::visible() && (event.key.keysym.sym == SDLK_ESCAPE)) { + chat::toggle(); + } else if (event.key.keysym.sym == '`' || event.key.keysym.sym == '~' || (event.key.keysym.sym == SDLK_ESCAPE)) { //last_control = 0; console::toggle(); |