Changeset 8945
- Timestamp:
- Nov 23, 2011, 2:52:32 PM (13 years ago)
- Location:
- code/branches/menue/data/gui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/menue/data/gui/layouts/SingleplayerMenu.layout
r8927 r8945 45 45 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 46 46 <Property Name="UnifiedAreaRect" Value="{{0.425,0},{0.725,0},{0.575,0},{0.775,0}}" /> 47 <Property Name="Disabled" Value="True" /> 47 48 <Event Name="Clicked" Function="SingleplayerMenu.SingleplayerConfigButton_clicked"/> 48 49 </Window> -
code/branches/menue/data/gui/scripts/InGameMenu.lua
r8079 r8945 43 43 -- events for ingamemenu 44 44 function P.button_quit_clicked(e) 45 openDecisionPopup( "Do you really want to quit the game?", InGameMenu. callback )45 openDecisionPopup( "Do you really want to quit the game?", InGameMenu.exitCallback ) 46 46 end 47 47 48 48 function P.button_mainmenu_clicked(e) 49 orxonox.execute("startMainMenu") 50 hideMenuSheet("InGameMenu") 49 openDecisionPopup( "Do you really want to return to the main menu?", InGameMenu.mainMenuCallback ) 51 50 end 52 51 … … 59 58 end 60 59 61 function P.callback(doExit) 60 function P.mainMenuCallback(doExit) 61 if doExit then 62 orxonox.execute("startMainMenu") 63 hideMenuSheet("InGameMenu") 64 else 65 P.onShow() 66 end 67 end 68 69 function P.exitCallback(doExit) 62 70 if doExit then 63 71 hideMenuSheet("InGameMenu") -
code/branches/menue/data/gui/scripts/SingleplayerConfigMenu.lua
r8938 r8945 39 39 table.insert(P.commandList, "Gametype bAutoStart_") 40 40 table.insert(P.commandList, "Gametype numberOfBots_") 41 table.insert(P.commandList, "Dynamicmatch gameTime_") 42 table.insert(P.commandList, "Dynamicmatch friendlyfire") 43 table.insert(P.commandList, "Dynamicmatch tutorial") 44 table.insert(P.commandList, "LastManStanding lives") 45 table.insert(P.commandList, "LastManStanding respawnDelay") 46 table.insert(P.commandList, "LastManStanding bNoPunishment") 47 table.insert(P.commandList, "LastManStanding bHardPunishment") 48 table.insert(P.commandList, "LastTeamStanding lives") 49 table.insert(P.commandList, "LastTeamStanding respawnDelay") 50 table.insert(P.commandList, "LastTeamStanding bNoPunishment") 51 table.insert(P.commandList, "LastTeamStanding bHardPunishment") 52 table.insert(P.commandList, "TeamDeathmatch teams_") 41 53 table.insert(P.commandList, "UnderAttack gameTime_") 42 table.insert(P.commandList, "TeamDeathmatch teams_")43 54 44 55 P.nameList = {} … … 46 57 table.insert(P.nameList, "Autostart") 47 58 table.insert(P.nameList, "Number of Bots") 59 table.insert(P.nameList, "Dynamicmatch: game time") 60 table.insert(P.nameList, "Dynamicmatch: friendly fire") 61 table.insert(P.nameList, "Dynamicmatch: tutorial") 62 table.insert(P.nameList, "LastManStanding: lives") 63 table.insert(P.nameList, "LastManStanding: respawn delay") 64 table.insert(P.nameList, "LastManStanding: no punishment") 65 table.insert(P.nameList, "LastManStanding: hard punishment") 66 table.insert(P.nameList, "LastTeamStanding: lives") 67 table.insert(P.nameList, "LastTeamStanding: respawn delay") 68 table.insert(P.nameList, "LastTeamStanding: no punishment") 69 table.insert(P.nameList, "LastTeamStanding: hard punishment") 70 table.insert(P.nameList, "TeamDeathmatch: Number of teams") 48 71 table.insert(P.nameList, "UnderAttack: game time") 49 table.insert(P.nameList, "TeamDeathmatch: Number of teams")50 72 51 73 P.linesList = {} … … 79 101 function P.createLine(k) 80 102 local offset = 0 103 if winMgr:isWindowPresent("orxonox/SingleplayerConfigMenu/MiscConfigPane/ConfigCommand" .. k) then 104 winMgr:destroyWindow("orxonox/SingleplayerConfigMenu/MiscConfigPane/ConfigCommand" .. k) 105 end 81 106 local line = winMgr:createWindow("DefaultWindow", "orxonox/SingleplayerConfigMenu/MiscConfigPane/ConfigCommand" .. k) 82 107 line:setHeight(CEGUI.UDim(0, P.lineHeight)) -
code/branches/menue/data/gui/scripts/SingleplayerMenu.lua
r8938 r8945 114 114 local levelImage = winMgr:getWindow("orxonox/SingleplayerLevelImage") 115 115 local levelDescription = winMgr:getWindow("orxonox/SingleplayerLevelDescription") 116 local configButton = winMgr:getWindow("orxonox/SingleplayerConfigButton") 116 117 local level = P.SingleplayerGetSelectedLevel() 117 118 if level ~= nil then … … 120 121 levelImage:setProperty("Image", "set:"..levelXMLFilename..imageName.." image:full_image") 121 122 levelDescription:setText(level:getDescription()) 123 if level:hasTag("gametype") then 124 configButton:setProperty("Disabled", "False") 125 else 126 configButton:setProperty("Disabled", "True") 127 end 122 128 else 123 129 levelImage:setProperty("Image", nil) 124 130 levelDescription:setText("") 131 configButton:setProperty("Disabled", "True") 125 132 end 126 133 end
Note: See TracChangeset
for help on using the changeset viewer.