Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 23, 2012, 4:24:24 PM (13 years ago)
Author:
huttemat
Message:

test2

Location:
code/branches/shipSelection/data/gui/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/shipSelection/data/gui/scripts/ShipSelectionMenu.lua

    r9046 r9057  
    22
    33local P = createMenuSheet("ShipSelectionMenu")
    4 level = nil
    54P.activeTabIndexes = {}
    65P.scrollbarWidth = 13
    7 function P.loadShips(levelname)
    8     --orxonox.execute("echo " .. levelname)
    9     --level = levelname
    10 end
     6
    117function P.onLoad()
    12 --[[    P.createLevelList()
    13    
     8   orxonox.execute("orxout internal_warning Ships= " .. selectedlevel.getShips())
     9   P.createLevelList(selectedlevel)
     10--[[     
    1411    -- create tabs with desired tab as argument (nil for all)
    1512    P.createFilterTab("Gametypes", "gametype")
     
    4037    })--]]
    4138end
    42 --[[
    43 function P.createLevelList()
    44     P.levelList = {}
     39
     40function P.createShipList(level)
     41
     42    orxonox.execute("orxout internal_warning Ships= " .. selectedlevel:getShips())
     43    --local stream = selectedlevel:getShips()
     44    --local substr = stream
     45    --while substr.find(",")
     46    --[[
    4547    local size = orxonox.LevelManager:getInstance():getNumberOfLevels()
    4648    local index = 0
     
    6062        end
    6163        index = index + 1
    62     end
     64    end--]]
    6365end
     66
     67
    6468
    6569function P.createFilterTab(name, tag)
  • code/branches/shipSelection/data/gui/scripts/SingleplayerMenu.lua

    r9046 r9057  
    66P.activeTabIndexes = {}
    77P.scrollbarWidth = 13
     8selectedlevel = {} -- level for ship selection
    89
    910function P.onLoad()
     
    141142
    142143function P.SingleplayerStartButton_clicked(e)
    143     local level = P.SingleplayerGetSelectedLevel()
    144     if level ~= nil then
    145 
    146         if level:hasTag("shipselection") then
     144    selectedlevel = P.SingleplayerGetSelectedLevel()
     145    if selectedlevel ~= nil then
     146        if selectedlevel:hasTag("shipselection") then
    147147            local shipSelectionMenu = showMenuSheet("ShipSelectionMenu", true)
    148             shipSelectionMenu:loadShips(level:getXMLFilename())
    149148        else
    150             orxonox.execute("startGame " .. level:getXMLFilename())
     149            orxonox.execute("startGame " .. selectedlevel:getXMLFilename())
    151150            hideAllMenuSheets()
    152151        end
Note: See TracChangeset for help on using the changeset viewer.