Changeset 6459 for code/branches/gamestate/data/gui/scripts/BasicGUI.lua
- Timestamp:
- Jan 24, 2010, 5:03:27 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gamestate/data/gui/scripts/BasicGUI.lua
r5781 r6459 8 8 end 9 9 10 -- useless? 10 11 P.overlay = nil 11 12 12 13 -- constructor of the GUI 13 function P:new (gui, fname) 14 local newElement = { window = gui, filename = fname, visible = false } or {} 14 function P:new(_filename, _visible, _gui) 15 local newElement = { 16 filename = _filename, 17 gui = _gui, 18 visible = _visible or false 19 } or {} 15 20 setmetatable(newElement, self) -- connects new element with class 16 21 self.__index = self … … 23 28 24 29 -- hide function for the GUI 25 function P:hide 30 function P:hide() 26 31 self.window:hide() 27 32 self.visible = false … … 29 34 30 35 -- show function for the GUI 31 function P:show 36 function P:show() 32 37 self.window:show() 33 38 self.visible = true 34 39 end 35 40 36 function P:load 37 self.window = winMgr:loadWindowLayout(self. layoutString)41 function P:load() 42 self.window = winMgr:loadWindowLayout(self.filename .. ".layout") 38 43 self:init() 39 44 return self
Note: See TracChangeset
for help on using the changeset viewer.