Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 16, 2010, 1:49:16 PM (15 years ago)
Author:
rgrieder
Message:

Linked every GUI sheet to exactly one InputState.
Also added util/TriBool that has states {true, false, Dontcare}.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gamestate/data/gui/scripts/BasicGUI.lua

    r6459 r6537  
    88end
    99
    10 -- useless?
     10-- useless, even wrong? P is the class, not the object..
    1111P.overlay = nil
    1212
    1313-- constructor of the GUI
    14 function P:new(_filename, _visible, _gui)
     14function P:new(_filename, _gui, _visible)
    1515    local newElement = {
    1616        filename = _filename,
     
    2323end
    2424
     25-- Override this function if you need to
    2526function P:init()
    26 -- this function is empty and intended for inheriting GUIs to use
     27end
     28
     29-- Override this function if you need to
     30-- But don't forget to stick to the naming convention ("GUI_" .. self.filename)
     31function P:createInputState()
     32    self.inputState = guiMgr:createInputState("GUI_" .. self.filename)
    2733end
    2834
     
    4147function P:load()
    4248    self.window = winMgr:loadWindowLayout(self.filename .. ".layout")
     49    self:createInputState()
    4350    self:init()
    4451    return self
Note: See TracChangeset for help on using the changeset viewer.