Changeset 6722 for code/branches/gamestates2/data/gui/scripts
- Timestamp:
- Apr 13, 2010, 6:17:51 PM (15 years ago)
- Location:
- code/branches/gamestates2/data/gui/scripts
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gamestates2/data/gui/scripts/AudioMenu.lua
r6720 r6722 169 169 170 170 function P.AudioBackButton_clicked(e) 171 hide GUI(P.name)171 hideMenuSheet(P.name) 172 172 end 173 173 -
code/branches/gamestates2/data/gui/scripts/ControlsMenu.lua
r6718 r6722 4 4 5 5 function P.ControlsMouseControlsButton_clicked(e) 6 show GUI("MouseControlsMenu", true)6 showMenuSheet("MouseControlsMenu", true) 7 7 end 8 8 9 9 function P.ControlsKeyboardControlsButton_clicked(e) 10 show GUI("KeyBindMenu", true)10 showMenuSheet("KeyBindMenu", true) 11 11 end 12 12 13 13 function P.ControlsBackButton_clicked(e) 14 hide GUI(P.name)14 hideMenuSheet(P.name) 15 15 end 16 16 -
code/branches/gamestates2/data/gui/scripts/CreditsMenu.lua
r6718 r6722 4 4 5 5 function P.CreditsBackButton_clicked(e) 6 hide GUI(P.name)6 hideMenuSheet(P.name) 7 7 end 8 8 -
code/branches/gamestates2/data/gui/scripts/DecisionPopup.lua
r6718 r6722 16 16 P.functionPtr(true) 17 17 end 18 hide GUI("DecisionPopup")18 hideMenuSheet("DecisionPopup") 19 19 end 20 20 … … 23 23 P.functionPtr(false) 24 24 end 25 hide GUI("DecisionPopup")25 hideMenuSheet("DecisionPopup") 26 26 end 27 27 -
code/branches/gamestates2/data/gui/scripts/GUITools.lua
r6718 r6722 15 15 16 16 function openDecisionPopup( text, callbackPtr ) 17 show GUI("DecisionPopup", false, true)17 showMenuSheet("DecisionPopup", false, true) 18 18 DecisionPopup.setCallback(callbackPtr) 19 19 DecisionPopup.setText(text) … … 21 21 22 22 function openInfoPopup(text, functionPtr, closeButton, arguments) 23 show GUI("InfoPopup", false, true)23 showMenuSheet("InfoPopup", false, true) 24 24 InfoPopup.execute(functionPtr, arguments) 25 25 InfoPopup.setText(text) -
code/branches/gamestates2/data/gui/scripts/GameplayMenu.lua
r6720 r6722 37 37 38 38 function P.GameplayBackButton_clicked(e) 39 hide GUI(P.name)39 hideMenuSheet(P.name) 40 40 end 41 41 -
code/branches/gamestates2/data/gui/scripts/GraphicsMenu.lua
r6720 r6722 192 192 193 193 function P.GraphicsBackButton_clicked(e) 194 hide GUI(P.name)194 hideMenuSheet(P.name) 195 195 end 196 196 -
code/branches/gamestates2/data/gui/scripts/InGameMenu.lua
r6718 r6722 12 12 orxonox.Game:getInstance():popState() 13 13 orxonox.Game:getInstance():requestState("mainmenu") 14 hide GUI("InGameMenu")14 hideMenuSheet("InGameMenu") 15 15 end 16 16 17 17 function P.button_settings_clicked(e) 18 show GUI("SettingsMenu", true)18 showMenuSheet("SettingsMenu", true) 19 19 end 20 20 21 21 function P.button_return_clicked(e) 22 hide GUI("InGameMenu")22 hideMenuSheet("InGameMenu") 23 23 end 24 24 25 25 function P.callback(doExit) 26 26 if doExit then 27 hide GUI("InGameMenu")27 hideMenuSheet("InGameMenu") 28 28 orxonox.execute("exit") 29 29 end -
code/branches/gamestates2/data/gui/scripts/InfoPopup.lua
r6718 r6722 29 29 -- events for ingamemenu 30 30 function P.close(e) 31 hide GUI(P.name)31 hideMenuSheet(P.name) 32 32 end 33 33 -
code/branches/gamestates2/data/gui/scripts/InitialiseGUI.lua
r6721 r6722 75 75 76 76 -- ? 77 function show GUI(name, bHidePrevious, ptr)78 local sheet = show GUI(name, bHidePrevious)77 function showMenuSheet(name, bHidePrevious, ptr) 78 local sheet = showMenuSheet(name, bHidePrevious) 79 79 sheet.overlay = ptr 80 80 return sheet … … 82 82 83 83 -- Shows the specified menu sheet and loads it if neccessary 84 function show GUI(name, bHidePrevious)84 function showMenuSheet(name, bHidePrevious) 85 85 -- Get sheet (or load it) 86 86 local menuSheet = loadSheet(name) … … 103 103 -- Hide if already displayed (to make sure it is up front in the end) 104 104 if activeMenuSheets[name] ~= nil then 105 hide GUI(name)105 hideMenuSheet(name) 106 106 end 107 107 … … 146 146 end 147 147 148 function hide GUI(name)148 function hideMenuSheet(name) 149 149 local sheetTuple = activeMenuSheets[name] 150 150 if sheetTuple == nil then … … 206 206 207 207 -- Hides all menu GUI sheets 208 function hideAll GUIs()208 function hideAllMenuSheets() 209 209 while activeMenuSheets.size ~= 0 do 210 hide GUI(activeMenuSheets.topSheetTuple.sheet.name)210 hideMenuSheet(activeMenuSheets.topSheetTuple.sheet.name) 211 211 end 212 212 end … … 217 217 orxonox.execute("exit") 218 218 elseif activeMenuSheets.size > 0 then 219 orxonox.execute("hide GUI"..activeMenuSheets.topSheetTuple.sheet.name)219 orxonox.execute("hideMenuSheet "..activeMenuSheets.topSheetTuple.sheet.name) 220 220 else 221 show GUI("InGameMenu")221 showMenuSheet("InGameMenu") 222 222 end 223 223 end -
code/branches/gamestates2/data/gui/scripts/KeyBindMenu.lua
r6720 r6722 244 244 245 245 function P.KeyBindBackButton_clicked(e) 246 hide GUI("KeyBindMenu")246 hideMenuSheet("KeyBindMenu") 247 247 end 248 248 -
code/branches/gamestates2/data/gui/scripts/MainMenu.lua
r6718 r6722 9 9 10 10 function P.SingleplayerButton_clicked(e) 11 show GUI("SingleplayerMenu", true)11 showMenuSheet("SingleplayerMenu", true) 12 12 end 13 13 14 14 function P.MultiplayerButton_clicked(e) 15 show GUI("MultiplayerMenu", true)15 showMenuSheet("MultiplayerMenu", true) 16 16 end 17 17 18 18 function P.SettingsButton_clicked(e) 19 show GUI("SettingsMenu", true)19 showMenuSheet("SettingsMenu", true) 20 20 end 21 21 22 22 function P.CreditsButton_clicked(e) 23 show GUI("CreditsMenu", true)23 showMenuSheet("CreditsMenu", true) 24 24 end 25 25 -
code/branches/gamestates2/data/gui/scripts/MouseControlsMenu.lua
r6720 r6722 95 95 96 96 function P.MouseControlsBackButton_clicked(e) 97 hide GUI(P.name)97 hideMenuSheet(P.name) 98 98 end 99 99 -
code/branches/gamestates2/data/gui/scripts/MultiplayerMenu.lua
r6720 r6722 62 62 orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw") 63 63 orxonox.execute(multiplayerMode) 64 hideAll GUIs()64 hideAllMenuSheets() 65 65 end 66 66 end 67 67 68 68 function P.MultiplayerBackButton_clicked(e) 69 hide GUI(P.name)69 hideMenuSheet(P.name) 70 70 end 71 71 -
code/branches/gamestates2/data/gui/scripts/MultiplayerOptionsMenu.lua
r6718 r6722 4 4 5 5 function P.MultiplayerOptionsBackButton_clicked(e) 6 hide GUI(P.name)6 hideMenuSheet(P.name) 7 7 end 8 8 -
code/branches/gamestates2/data/gui/scripts/SettingsMenu.lua
r6718 r6722 4 4 5 5 function P.SettingsGameplayButton_clicked(e) 6 show GUI("GameplayMenu", true)6 showMenuSheet("GameplayMenu", true) 7 7 end 8 8 9 9 function P.SettingsMultiplayerOptionsButton_clicked(e) 10 show GUI("MultiplayerOptionsMenu", true)10 showMenuSheet("MultiplayerOptionsMenu", true) 11 11 end 12 12 13 13 function P.SettingsControlsButton_clicked(e) 14 show GUI("ControlsMenu", true)14 showMenuSheet("ControlsMenu", true) 15 15 end 16 16 17 17 function P.SettingsGraphicsButton_clicked(e) 18 show GUI("GraphicsMenu", true)18 showMenuSheet("GraphicsMenu", true) 19 19 end 20 20 21 21 function P.SettingsAudioButton_clicked(e) 22 show GUI("AudioMenu", true)22 showMenuSheet("AudioMenu", true) 23 23 end 24 24 … … 29 29 30 30 function P.SettingsBackButton_clicked(e) 31 hide GUI(P.name)31 hideMenuSheet(P.name) 32 32 end 33 33 -
code/branches/gamestates2/data/gui/scripts/SingleplayerMenu.lua
r6720 r6722 34 34 orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw") 35 35 orxonox.execute("startGame") 36 hideAll GUIs()36 hideAllMenuSheets() 37 37 end 38 38 end 39 39 40 40 function P.SingleplayerBackButton_clicked(e) 41 hide GUI(P.name)41 hideMenuSheet(P.name) 42 42 end 43 43
Note: See TracChangeset
for help on using the changeset viewer.