Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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.

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.