/* Devtools */
if (devtools && !mainmenu) {
- ProcessDevInput();
+ /* Console */
+ if (Input::isKeyPressed(consolekey)) {
+ console = !console;
+ if (console) {
+ OPENAL_SetFrequency(OPENAL_ALL);
+ } else {
+ freeze = 0;
+ waiting = false;
+ }
+ }
+
+ /* Other devtools, disabled when the console is shown */
+ if (!console) {
+ ProcessDevInput();
+ }
}
}
void Game::ProcessDevInput()
{
- if (!devtools || mainmenu) {
+ if (!devtools || mainmenu || console) {
return;
}
- /* Console */
- if (Input::isKeyPressed(consolekey)) {
- console = !console;
- if (console) {
- OPENAL_SetFrequency(OPENAL_ALL);
- } else {
- freeze = 0;
- waiting = false;
- }
- }
-
if (Input::isKeyDown(SDL_SCANCODE_LALT)) {
/* Enable editor */
if (Input::isKeyPressed(SDL_SCANCODE_M) && !Input::isKeyDown(SDL_SCANCODE_LSHIFT)) {