Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 17, 2010, 3:56:50 PM (14 years ago)
Author:
dafrick
Message:

Restoring proper ESC functionality for InGameConsole.

File:
1 edited

Legend:

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

    r7607 r7649  
    55local activeMenuSheets = {size = 0, topSheetTuple = nil}
    66local menuSheetsRoot = guiMgr:getMenuRootWindow()
     7local bInGameConsoleClosed = false
    78orxonox.GUIManager:subscribeEventHelper(menuSheetsRoot, "KeyDown", "keyPressed")
    89
     
    201202    -- HUGE, very HUGE hacks!
    202203
     204    -- If the InGameConsole is active, ignore the ESC command.
     205    if bInGameConsoleClosed == true then
     206        bInGameConsoleClosed = falses
     207        return
     208    end
     209
    203210    -- Count the number of sheets that don't need input till the first that does.
    204211    local counter = noInputSheetCounter()
     
    235242end
    236243
     244function inGameConsoleClosed()
     245    bInGameConsoleClosed = not bInGameConsoleClosed;
     246end
     247
    237248----------------------
    238249--- Initialisation ---
Note: See TracChangeset for help on using the changeset viewer.