Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 23, 2018, 12:20:35 AM (7 years ago)
Author:
landauf
Message:

updated HostMenu.lua, MultiplayerMenu.lua, ShipSelectionMenu.lua, SingleplayerConfigMenu.lua to cegui 0.8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cegui0.8_ogre1.9/data/gui/scripts/HostMenu.lua

    r11795 r11799  
    1111function P.onLoad()
    1212    P.multiplayerMode = "startServer"
    13     local window = winMgr:getWindow("orxonox/MultiplayerShowAllCheckbox")
    14     local button = tolua.cast(window,"CEGUI::Checkbox")
     13    local window = P.window:getChild("HostMenuWindow/MultiplayerShowAllCheckbox")
     14    local button = tolua.cast(window,"CEGUI::ToggleButton")
    1515    button:setSelected(false)
    1616    P.createLevelList()
    1717
    1818    P:setButton(1, 1, {
    19             ["button"] = winMgr:getWindow("orxonox/HostMenuStartButton"),
     19            ["button"] = P.window:getChild("HostMenuStartButton"),
    2020            ["callback"]  = P.HostMenuStartButton_clicked
    2121    })
    2222
    2323    P:setButton(1, 2, {
    24             ["button"] = winMgr:getWindow("orxonox/HostMenuBackButton"),
     24            ["button"] = P.window:getChild("HostMenuBackButton"),
    2525            ["callback"]  = P.HostMenuBackButton_clicked
    2626    })
     
    2929function P.onShow()
    3030    if P.showAll ~= orxonox.GUIManager:inDevMode() then
    31         local window = winMgr:getWindow("orxonox/MultiplayerShowAllCheckbox")
    32         local button = tolua.cast(window,"CEGUI::Checkbox")
     31        local window = P.window:getChild("HostMenuWindow/MultiplayerShowAllCheckbox")
     32        local button = tolua.cast(window,"CEGUI::ToggleButton")
    3333        P.showAll = not P.showAll
    3434        button:setSelected(P.showAll)
     
    3636
    3737    if P.multiplayerMode == "startServer" then
    38         local window = winMgr:getWindow("orxonox/HostMenuHostButton")
     38        local window = P.window:getChild("HostMenuWindow/HostMenuHostButton")
    3939        local button = tolua.cast(window,"CEGUI::RadioButton")
    4040        button:setSelected(true)
     
    4343
    4444    if P.multiplayerMode == "startDedicated" then
    45         local window = winMgr:getWindow("orxonox/HostMenuDedicatedButton")
     45        local window = P.window:getChild("HostMenuWindow/HostMenuDedicatedButton")
    4646        local button = tolua.cast(window,"CEGUI::RadioButton")
    4747        button:setSelected(true)
     
    5353    P.levelList = {}
    5454    P.itemList = {}
    55     local listbox = CEGUI.toListbox(winMgr:getWindow("orxonox/HostMenuListbox"))
     55    local listbox = CEGUI.toListbox(P.window:getChild("HostMenuWindow/HostMenuListbox"))
    5656    listbox:resetList()
    5757    orxonox.GUIManager:setItemTooltipsEnabledHelper(listbox, true)
     
    9898
    9999function P.HostMenuStartButton_clicked(e)
    100     local listbox = CEGUI.toListbox(winMgr:getWindow("orxonox/HostMenuListbox"))
     100    local listbox = CEGUI.toListbox(P.window:getChild("HostMenuWindow/HostMenuListbox"))
    101101    local choice = listbox:getFirstSelectedItem()
    102102    if choice ~= nil then
     
    111111
    112112function P.MultiplayerShowAll_clicked(e)
    113     local checkbox = tolua.cast(winMgr:getWindow("orxonox/MultiplayerShowAllCheckbox"), "CEGUI::Checkbox")
     113    local checkbox = tolua.cast(P.window:getChild("HostMenuWindow/MultiplayerShowAllCheckbox"), "CEGUI::ToggleButton")
    114114    local show = checkbox:isSelected()
    115115    if show ~= P.showAll then
Note: See TracChangeset for help on using the changeset viewer.