Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 16, 2010, 2:50:16 PM (14 years ago)
Author:
rgrieder
Message:

Merged gamestates2 branch back to trunk.
This brings in some heavy changes in the GUI framework.
It should also fix problems with triggered asserts in the InputManager.

Note: PickupInventory does not seem to work —> Segfault when showing because before, the owner in GUIOverlay::setGUIName is already NULL.
I haven't tested it before, so I can't tell whether it's my changes.

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/data/gui/scripts/SingleplayerMenu.lua

    r6417 r6746  
    11-- SingleplayerMenu.lua
    22
    3 BasicGUI = require("BasicGUI")
    4 local P = BasicGUI:new() --inherit everything from the gui package
    5 if _REQUIREDNAME == nil then
    6     SingleplayerMenu = P
    7 else
    8     _G[_REQUIREDNAME] = P
    9 end
     3local P = createMenuSheet("SingleplayerMenu")
    104
    11 P.filename = "SingleplayerMenu"
    12 P.layoutString = "SingleplayerMenu.layout"
    13 
    14 function P:init()
     5function P.onLoad()
    156    listbox = winMgr:getWindow("orxonox/SingleplayerLevelListbox")
    167    preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
     
    3021    for k,v in pairs(levelList) do
    3122        item = CEGUI.createListboxTextItem(v)
    32         item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
     23        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
    3324        CEGUI.toListbox(listbox):addItem(item)
    3425        if v .. ".oxw" == preselect then
     
    4334        orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw")
    4435        orxonox.execute("startGame")
    45         hideAllGUIs()
     36        hideAllMenuSheets()
    4637    end
    4738end
    4839
    4940function P.SingleplayerBackButton_clicked(e)
    50     hideGUI(P.filename)
     41    hideMenuSheet(P.name)
    5142end
    5243
Note: See TracChangeset for help on using the changeset viewer.