Changeset 6537 for code/branches/gamestate/data/gui/scripts
- Timestamp:
- Mar 16, 2010, 1:49:16 PM (15 years ago)
- Location:
- code/branches/gamestate/data/gui/scripts
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gamestate/data/gui/scripts/BasicGUI.lua
r6459 r6537 8 8 end 9 9 10 -- useless ?10 -- useless, even wrong? P is the class, not the object.. 11 11 P.overlay = nil 12 12 13 13 -- constructor of the GUI 14 function P:new(_filename, _ visible, _gui)14 function P:new(_filename, _gui, _visible) 15 15 local newElement = { 16 16 filename = _filename, … … 23 23 end 24 24 25 -- Override this function if you need to 25 26 function P:init() 26 -- this function is empty and intended for inheriting GUIs to use 27 end 28 29 -- Override this function if you need to 30 -- But don't forget to stick to the naming convention ("GUI_" .. self.filename) 31 function P:createInputState() 32 self.inputState = guiMgr:createInputState("GUI_" .. self.filename) 27 33 end 28 34 … … 41 47 function P:load() 42 48 self.window = winMgr:loadWindowLayout(self.filename .. ".layout") 49 self:createInputState() 43 50 self:init() 44 51 return self -
code/branches/gamestate/data/gui/scripts/DecisionPopup.lua
r6459 r6537 7 7 else 8 8 _G[_REQUIREDNAME] = P 9 end10 11 function P:init()12 9 end 13 10 -
code/branches/gamestate/data/gui/scripts/InGameMenu.lua
r6459 r6537 8 8 _G[_REQUIREDNAME] = P 9 9 end 10 11 12 function P:init()13 end14 15 10 16 11 -- events for ingamemenu -
code/branches/gamestate/data/gui/scripts/InfoPopup.lua
r6459 r6537 8 8 else 9 9 _G[_REQUIREDNAME] = P 10 end11 12 function P:init()13 10 end 14 11 … … 23 20 end 24 21 25 function P.setText( text)22 function P.setText(text) 26 23 winMgr:getWindow("orxonox/InfoPopup_text"):setText( text ) 27 24 end … … 39 36 -- events for ingamemenu 40 37 function P.close(e) 41 hideGUI( "InfoPopup")38 hideGUI(P.filename) 42 39 end 43 40 -
code/branches/gamestate/data/gui/scripts/InitialiseGUI.lua
r6417 r6537 1 winMgr = CEGUI.WindowManager:getSingleton() 2 guiMgr = orxonox.GUIManager:getInstance() 3 inputMgr = orxonox.InputManager:getInstance() 4 1 5 local schemeMgr = CEGUI.SchemeManager:getSingleton() 2 winMgr = CEGUI.WindowManager:getSingleton() 3 local logger = CEGUI.Logger:getSingleton() 4 local system = CEGUI.System:getSingleton() 5 local cursor = CEGUI.MouseCursor:getSingleton() 6 local system = CEGUI.System:getSingleton() 7 local cursor = CEGUI.MouseCursor:getSingleton() 6 8 7 9 schemeMgr:loadScheme("TaharezLookSkin.scheme") … … 87 89 else 88 90 if nrOfActiveSheets == 0 then 89 orxonox.InputManager:getInstance():enterState("guiMouseOnly")91 --orxonox.InputManager:getInstance():enterState("guiMouseOnly") 90 92 orxonox.HumanController:pauseControl() 91 93 end 92 94 end 95 orxonox.InputManager:getInstance():enterState(currentGUI.inputState) 96 93 97 nrOfActiveSheets = nrOfActiveSheets + 1 94 98 table.insert(activeSheets, filename) … … 161 165 bHidePrevious[filename] = nil 162 166 if nrOfActiveSheets == 0 then 163 orxonox.InputManager:getInstance():leaveState("guiMouseOnly")167 --orxonox.InputManager:getInstance():leaveState("guiMouseOnly") 164 168 orxonox.HumanController:resumeControl() 165 169 hideCursor() 166 170 end 171 orxonox.InputManager:getInstance():leaveState(currentGUI.inputState) 167 172 end 168 173
Note: See TracChangeset
for help on using the changeset viewer.