[Orxonox-commit 4274] r8945 - in code/branches/menue/data/gui: layouts scripts
baermatt at orxonox.net
baermatt at orxonox.net
Wed Nov 23 14:52:32 CET 2011
Author: baermatt
Date: 2011-11-23 14:52:32 +0100 (Wed, 23 Nov 2011)
New Revision: 8945
Modified:
code/branches/menue/data/gui/layouts/SingleplayerMenu.layout
code/branches/menue/data/gui/scripts/InGameMenu.lua
code/branches/menue/data/gui/scripts/SingleplayerConfigMenu.lua
code/branches/menue/data/gui/scripts/SingleplayerMenu.lua
Log:
Some bugfixes for the singleplayer config menu.
Modified: code/branches/menue/data/gui/layouts/SingleplayerMenu.layout
===================================================================
--- code/branches/menue/data/gui/layouts/SingleplayerMenu.layout 2011-11-23 13:14:29 UTC (rev 8944)
+++ code/branches/menue/data/gui/layouts/SingleplayerMenu.layout 2011-11-23 13:52:32 UTC (rev 8945)
@@ -44,6 +44,7 @@
<Property Name="Text" Value="Configure" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.425,0},{0.725,0},{0.575,0},{0.775,0}}" />
+ <Property Name="Disabled" Value="True" />
<Event Name="Clicked" Function="SingleplayerMenu.SingleplayerConfigButton_clicked"/>
</Window>
<Window Type="MenuWidgets/Button" Name="orxonox/SingleplayerBackButton" >
Modified: code/branches/menue/data/gui/scripts/InGameMenu.lua
===================================================================
--- code/branches/menue/data/gui/scripts/InGameMenu.lua 2011-11-23 13:14:29 UTC (rev 8944)
+++ code/branches/menue/data/gui/scripts/InGameMenu.lua 2011-11-23 13:52:32 UTC (rev 8945)
@@ -42,12 +42,11 @@
-- events for ingamemenu
function P.button_quit_clicked(e)
- openDecisionPopup( "Do you really want to quit the game?", InGameMenu.callback )
+ openDecisionPopup( "Do you really want to quit the game?", InGameMenu.exitCallback )
end
function P.button_mainmenu_clicked(e)
- orxonox.execute("startMainMenu")
- hideMenuSheet("InGameMenu")
+ openDecisionPopup( "Do you really want to return to the main menu?", InGameMenu.mainMenuCallback )
end
function P.button_settings_clicked(e)
@@ -58,9 +57,18 @@
hideMenuSheet("InGameMenu")
end
-function P.callback(doExit)
+function P.mainMenuCallback(doExit)
if doExit then
+ orxonox.execute("startMainMenu")
hideMenuSheet("InGameMenu")
+ else
+ P.onShow()
+ end
+end
+
+function P.exitCallback(doExit)
+ if doExit then
+ hideMenuSheet("InGameMenu")
orxonox.execute("exit")
else
P.onShow()
Modified: code/branches/menue/data/gui/scripts/SingleplayerConfigMenu.lua
===================================================================
--- code/branches/menue/data/gui/scripts/SingleplayerConfigMenu.lua 2011-11-23 13:14:29 UTC (rev 8944)
+++ code/branches/menue/data/gui/scripts/SingleplayerConfigMenu.lua 2011-11-23 13:52:32 UTC (rev 8945)
@@ -38,15 +38,37 @@
table.insert(P.commandList, "Gametype initialStartCountdown_")
table.insert(P.commandList, "Gametype bAutoStart_")
table.insert(P.commandList, "Gametype numberOfBots_")
+ table.insert(P.commandList, "Dynamicmatch gameTime_")
+ table.insert(P.commandList, "Dynamicmatch friendlyfire")
+ table.insert(P.commandList, "Dynamicmatch tutorial")
+ table.insert(P.commandList, "LastManStanding lives")
+ table.insert(P.commandList, "LastManStanding respawnDelay")
+ table.insert(P.commandList, "LastManStanding bNoPunishment")
+ table.insert(P.commandList, "LastManStanding bHardPunishment")
+ table.insert(P.commandList, "LastTeamStanding lives")
+ table.insert(P.commandList, "LastTeamStanding respawnDelay")
+ table.insert(P.commandList, "LastTeamStanding bNoPunishment")
+ table.insert(P.commandList, "LastTeamStanding bHardPunishment")
+ table.insert(P.commandList, "TeamDeathmatch teams_")
table.insert(P.commandList, "UnderAttack gameTime_")
- table.insert(P.commandList, "TeamDeathmatch teams_")
P.nameList = {}
table.insert(P.nameList, "Start countdown")
table.insert(P.nameList, "Autostart")
table.insert(P.nameList, "Number of Bots")
+ table.insert(P.nameList, "Dynamicmatch: game time")
+ table.insert(P.nameList, "Dynamicmatch: friendly fire")
+ table.insert(P.nameList, "Dynamicmatch: tutorial")
+ table.insert(P.nameList, "LastManStanding: lives")
+ table.insert(P.nameList, "LastManStanding: respawn delay")
+ table.insert(P.nameList, "LastManStanding: no punishment")
+ table.insert(P.nameList, "LastManStanding: hard punishment")
+ table.insert(P.nameList, "LastTeamStanding: lives")
+ table.insert(P.nameList, "LastTeamStanding: respawn delay")
+ table.insert(P.nameList, "LastTeamStanding: no punishment")
+ table.insert(P.nameList, "LastTeamStanding: hard punishment")
+ table.insert(P.nameList, "TeamDeathmatch: Number of teams")
table.insert(P.nameList, "UnderAttack: game time")
- table.insert(P.nameList, "TeamDeathmatch: Number of teams")
P.linesList = {}
@@ -78,6 +100,9 @@
function P.createLine(k)
local offset = 0
+ if winMgr:isWindowPresent("orxonox/SingleplayerConfigMenu/MiscConfigPane/ConfigCommand" .. k) then
+ winMgr:destroyWindow("orxonox/SingleplayerConfigMenu/MiscConfigPane/ConfigCommand" .. k)
+ end
local line = winMgr:createWindow("DefaultWindow", "orxonox/SingleplayerConfigMenu/MiscConfigPane/ConfigCommand" .. k)
line:setHeight(CEGUI.UDim(0, P.lineHeight))
line:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, P.lineHeight*(k-1))))
Modified: code/branches/menue/data/gui/scripts/SingleplayerMenu.lua
===================================================================
--- code/branches/menue/data/gui/scripts/SingleplayerMenu.lua 2011-11-23 13:14:29 UTC (rev 8944)
+++ code/branches/menue/data/gui/scripts/SingleplayerMenu.lua 2011-11-23 13:52:32 UTC (rev 8945)
@@ -113,15 +113,22 @@
function SingleplayerSelectionChanged(e)
local levelImage = winMgr:getWindow("orxonox/SingleplayerLevelImage")
local levelDescription = winMgr:getWindow("orxonox/SingleplayerLevelDescription")
+ local configButton = winMgr:getWindow("orxonox/SingleplayerConfigButton")
local level = P.SingleplayerGetSelectedLevel()
if level ~= nil then
local levelXMLFilename = level:getXMLFilename()
local imageName = level:getScreenshot()
levelImage:setProperty("Image", "set:"..levelXMLFilename..imageName.." image:full_image")
levelDescription:setText(level:getDescription())
+ if level:hasTag("gametype") then
+ configButton:setProperty("Disabled", "False")
+ else
+ configButton:setProperty("Disabled", "True")
+ end
else
levelImage:setProperty("Image", nil)
levelDescription:setText("")
+ configButton:setProperty("Disabled", "True")
end
end
More information about the Orxonox-commit
mailing list