From 3499e2422aa1c280f7965c793983ad9302288043 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 10 May 2008 11:03:38 +0000 Subject: binds ESC to console --- src/client/input.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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(); -- cgit v1.2.3