Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8945


Ignore:
Timestamp:
Nov 23, 2011, 2:52:32 PM (13 years ago)
Author:
baermatt
Message:

Some bugfixes for the singleplayer config menu.

Location:
code/branches/menue/data/gui
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/menue/data/gui/layouts/SingleplayerMenu.layout

    r8927 r8945  
    4545            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    4646            <Property Name="UnifiedAreaRect" Value="{{0.425,0},{0.725,0},{0.575,0},{0.775,0}}" />
     47            <Property Name="Disabled" Value="True" />
    4748            <Event Name="Clicked" Function="SingleplayerMenu.SingleplayerConfigButton_clicked"/>
    4849        </Window>
  • code/branches/menue/data/gui/scripts/InGameMenu.lua

    r8079 r8945  
    4343-- events for ingamemenu
    4444function 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 )
    4646end
    4747
    4848function 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 )
    5150end
    5251
     
    5958end
    6059
    61 function P.callback(doExit)
     60function P.mainMenuCallback(doExit)
     61    if doExit then
     62        orxonox.execute("startMainMenu")
     63        hideMenuSheet("InGameMenu")
     64    else
     65        P.onShow()
     66    end
     67end
     68
     69function P.exitCallback(doExit)
    6270    if doExit then
    6371        hideMenuSheet("InGameMenu")
  • code/branches/menue/data/gui/scripts/SingleplayerConfigMenu.lua

    r8938 r8945  
    3939    table.insert(P.commandList, "Gametype bAutoStart_")
    4040    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_")
    4153    table.insert(P.commandList, "UnderAttack gameTime_")
    42     table.insert(P.commandList, "TeamDeathmatch teams_")
    4354
    4455    P.nameList = {}
     
    4657    table.insert(P.nameList, "Autostart")
    4758    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")
    4871    table.insert(P.nameList, "UnderAttack: game time")
    49     table.insert(P.nameList, "TeamDeathmatch: Number of teams")
    5072
    5173    P.linesList = {}
     
    79101function P.createLine(k)
    80102    local offset = 0
     103    if winMgr:isWindowPresent("orxonox/SingleplayerConfigMenu/MiscConfigPane/ConfigCommand" .. k) then
     104        winMgr:destroyWindow("orxonox/SingleplayerConfigMenu/MiscConfigPane/ConfigCommand" .. k)
     105    end
    81106    local line = winMgr:createWindow("DefaultWindow", "orxonox/SingleplayerConfigMenu/MiscConfigPane/ConfigCommand" .. k)
    82107    line:setHeight(CEGUI.UDim(0, P.lineHeight))
  • code/branches/menue/data/gui/scripts/SingleplayerMenu.lua

    r8938 r8945  
    114114    local levelImage = winMgr:getWindow("orxonox/SingleplayerLevelImage")
    115115    local levelDescription = winMgr:getWindow("orxonox/SingleplayerLevelDescription")
     116    local configButton = winMgr:getWindow("orxonox/SingleplayerConfigButton")
    116117    local level = P.SingleplayerGetSelectedLevel()
    117118    if level ~= nil then
     
    120121        levelImage:setProperty("Image", "set:"..levelXMLFilename..imageName.." image:full_image")
    121122        levelDescription:setText(level:getDescription())
     123        if level:hasTag("gametype") then
     124            configButton:setProperty("Disabled", "False")
     125        else
     126            configButton:setProperty("Disabled", "True")
     127        end
    122128    else
    123129        levelImage:setProperty("Image", nil)
    124130        levelDescription:setText("")
     131        configButton:setProperty("Disabled", "True")
    125132    end
    126133end
Note: See TracChangeset for help on using the changeset viewer.