Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 18, 2012, 3:39:47 PM (13 years ago)
Author:
smerkli
Message:

merged branch shipSelection

Location:
code/branches/presentation2012
Files:
2 edited
2 copied

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2012

  • code/branches/presentation2012/data/gui/scripts/SingleplayerMenu.lua

    r9050 r9208  
    22
    33local P = createMenuSheet("SingleplayerMenu")
    4 
     4P.loadAlong = {"ShipSelectionMenu"}
    55P.levelList = {}
    66P.activeTabIndexes = {}
    77P.scrollbarWidth = 13
     8selectedlevel = {} -- level for ship selection
    89
    910function P.onLoad()
     
    4647    while index < size do
    4748        level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index)
    48         if level ~= nil then
     49        if (level ~= nil and level:getXMLFilename() ~= "_temp.oxw") then
     50            --os.execute("echo " .. level:getXMLFilename() .." >> ~/outputorx")
    4951            local levelXMLFilename = level:getXMLFilename()
    5052            -- create an imageset for each screenshot
     
    141143
    142144function P.SingleplayerStartButton_clicked(e)
    143     local level = P.SingleplayerGetSelectedLevel()
    144     if level ~= nil then
    145         orxonox.execute("startGame " .. level:getXMLFilename())
    146         hideAllMenuSheets()
     145    selectedlevel = P.SingleplayerGetSelectedLevel()
     146    if selectedlevel ~= nil then
     147        if selectedlevel:hasTag("shipselection") then
     148            local shipSelectionMenu = showMenuSheet("ShipSelectionMenu", true)
     149            shipSelectionMenu:update()
     150        else
     151            orxonox.execute("startGame " .. selectedlevel:getXMLFilename())
     152            hideAllMenuSheets()
     153        end
    147154    end
    148155end
Note: See TracChangeset for help on using the changeset viewer.