Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7985 for code/branches


Ignore:
Timestamp:
Feb 27, 2011, 8:09:59 AM (14 years ago)
Author:
rgrieder
Message:

Fixed keyESC hack: after opening and closing the console, the first ESC keystroke was ignored.

Location:
code/branches/usability
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/usability/data/gui/scripts/SheetManager.lua

    r7928 r7985  
    55local activeMenuSheets = {size = 0, topSheetTuple = nil}
    66local menuSheetsRoot = guiMgr:getMenuRootWindow()
    7 local bInGameConsoleClosed = false
     7local bInGameConsoleOpen = false
    88local mainMenuLoaded = false
    99orxonox.GUIManager:subscribeEventHelper(menuSheetsRoot, "KeyDown", "keyPressed")
     
    221221
    222222    -- If the InGameConsole is active, ignore the ESC command.
    223     if bInGameConsoleClosed == true then
    224         bInGameConsoleClosed = false
     223    if bInGameConsoleOpen then
    225224        return
    226225    end
     
    279278end
    280279
     280function inGameConsoleOpened()
     281    bInGameConsoleOpen = true
     282end
     283
    281284function inGameConsoleClosed()
    282     bInGameConsoleClosed = not bInGameConsoleClosed;
     285    bInGameConsoleOpen = false
    283286end
    284287
  • code/branches/usability/src/orxonox/overlays/InGameConsole.cc

    r7689 r7985  
    513513            this->bActive_ = true;
    514514            InputManager::getInstance().enterState("console");
     515            GUIManager::getInstance().getLuaState()->doString("inGameConsoleOpened()"); // Notify the SheetManager in lua, that the console has been closed.
    515516            this->shell_->registerListener(this);
    516517
     
    611612    /*static*/ void InGameConsole::closeConsole()
    612613    {
    613         GUIManager::getInstance().getLuaState()->doString("inGameConsoleClosed()");  // Notify the SheetManager in lua, that the console has been closed, but not by ESC.
    614614        InGameConsole::getInstance().deactivate();
    615615    }
Note: See TracChangeset for help on using the changeset viewer.