[Orxonox-commit 3295] r7985 - in code/branches/usability: data/gui/scripts src/orxonox/overlays
rgrieder at orxonox.net
rgrieder at orxonox.net
Sun Feb 27 08:09:59 CET 2011
Author: rgrieder
Date: 2011-02-27 08:09:59 +0100 (Sun, 27 Feb 2011)
New Revision: 7985
Modified:
code/branches/usability/data/gui/scripts/SheetManager.lua
code/branches/usability/src/orxonox/overlays/InGameConsole.cc
Log:
Fixed keyESC hack: after opening and closing the console, the first ESC keystroke was ignored.
Modified: code/branches/usability/data/gui/scripts/SheetManager.lua
===================================================================
--- code/branches/usability/data/gui/scripts/SheetManager.lua 2011-02-27 06:44:55 UTC (rev 7984)
+++ code/branches/usability/data/gui/scripts/SheetManager.lua 2011-02-27 07:09:59 UTC (rev 7985)
@@ -4,7 +4,7 @@
local loadedSheets = {}
local activeMenuSheets = {size = 0, topSheetTuple = nil}
local menuSheetsRoot = guiMgr:getMenuRootWindow()
-local bInGameConsoleClosed = false
+local bInGameConsoleOpen = false
local mainMenuLoaded = false
orxonox.GUIManager:subscribeEventHelper(menuSheetsRoot, "KeyDown", "keyPressed")
@@ -220,8 +220,7 @@
-- HUGE, very HUGE hacks!
-- If the InGameConsole is active, ignore the ESC command.
- if bInGameConsoleClosed == true then
- bInGameConsoleClosed = false
+ if bInGameConsoleOpen then
return
end
@@ -278,8 +277,12 @@
return counter
end
+function inGameConsoleOpened()
+ bInGameConsoleOpen = true
+end
+
function inGameConsoleClosed()
- bInGameConsoleClosed = not bInGameConsoleClosed;
+ bInGameConsoleOpen = false
end
----------------------
Modified: code/branches/usability/src/orxonox/overlays/InGameConsole.cc
===================================================================
--- code/branches/usability/src/orxonox/overlays/InGameConsole.cc 2011-02-27 06:44:55 UTC (rev 7984)
+++ code/branches/usability/src/orxonox/overlays/InGameConsole.cc 2011-02-27 07:09:59 UTC (rev 7985)
@@ -512,6 +512,7 @@
{
this->bActive_ = true;
InputManager::getInstance().enterState("console");
+ GUIManager::getInstance().getLuaState()->doString("inGameConsoleOpened()"); // Notify the SheetManager in lua, that the console has been closed.
this->shell_->registerListener(this);
this->windowResized(this->windowW_, this->windowH_);
@@ -610,7 +611,6 @@
*/
/*static*/ void InGameConsole::closeConsole()
{
- GUIManager::getInstance().getLuaState()->doString("inGameConsoleClosed()"); // Notify the SheetManager in lua, that the console has been closed, but not by ESC.
InGameConsole::getInstance().deactivate();
}
More information about the Orxonox-commit
mailing list