Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 6, 2011, 2:30:24 PM (14 years ago)
Author:
dafrick
Message:

Adding toggleGUI functionality, not yet used, though. Toggling of QuestGUI needs another approach.

File:
1 edited

Legend:

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

    r8032 r8033  
    8989        ["sheet"]          = menuSheet,
    9090        ["bHidePrevious"]  = bHidePrevious,
    91         ["bNoInput"]       = bNoInput
     91        ["bNoInput"]       = bNoInput,
     92        ["name"]           = name
    9293    }
    9394    table.insert(activeMenuSheets, sheetTuple) -- indexed array access
     
    298299end
    299300
     301function getGUIFirstActive(name, bHidePrevious, bNoInput)
     302    local sheet = activeMenuSheets.topSheetTuple
     303    -- If the topmost gui sheet has the input name
     304    if sheet ~= nil and sheet.name == name then
     305        guiMgr:toggleGUIHelper(name, bHidePrevious, bNoInput, false);
     306    else
     307        guiMgr:toggleGUIHelper(name, bHidePrevious, bNoInput, true);
     308    end
     309end
     310
    300311----------------------
    301312--- Initialisation ---
Note: See TracChangeset for help on using the changeset viewer.