Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-04-06 14:13:36 +0000
committerStijn Buys <ingar@osirion.org>2008-04-06 14:13:36 +0000
commit7b5a6b820d5acef36d402bd5a52d783ec68d33c7 (patch)
treea1cb65e071441277865ca5f4e315611cdd51c0e5 /src/client/console.cc
parent25d2c764443723eb7a3dd5f8bf0b76586c1ff10b (diff)
mouse grabbing, Cvar and Func info
Diffstat (limited to 'src/client/console.cc')
-rw-r--r--src/client/console.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/client/console.cc b/src/client/console.cc
index 2d667a8..ca84384 100644
--- a/src/client/console.cc
+++ b/src/client/console.cc
@@ -84,7 +84,7 @@ void init()
console_visible = false;
// add engine functions
- //core::Func::add("con_toggle", (core::FuncPtr) func_con_toggle);
+ core::Func::add("con_toggle", (core::FuncPtr) func_con_toggle);
text.clear();
console_scroll = 0;
@@ -214,7 +214,13 @@ void toggle()
history_pos = history.rbegin();
(*history_pos).clear();
+
+ SDL_WM_GrabInput(SDL_GRAB_OFF);
+ } else {
+ SDL_WM_GrabInput(SDL_GRAB_ON);
}
+
+ setkeyboardmode(console::visible());
}
void keypressed(int key)