Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 23, 2018, 12:20:35 AM (6 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/MultiplayerMenu.lua

    r11795 r11799  
    1212    --button are arranged in a 3x2 matrix, Join and Host buttons are in the upper left and middle, the back button in the lower right of the table
    1313    P:setButton(1, 1, {
    14             ["button"] = winMgr:getWindow("orxonox/MultiplayerJoinButton"),
     14            ["button"] = P.window:getChild("MultiplayerJoinButton"),
    1515            ["callback"]  = P.MultiplayerJoinButton_clicked
    1616    })
    1717
    1818    P:setButton(1, 2, {
    19             ["button"] = winMgr:getWindow("orxonox/MultiplayerHostButton"),
     19            ["button"] = P.window:getChild("MultiplayerHostButton"),
    2020            ["callback"]  = P.MultiplayerHostButton_clicked
    2121    })
    2222
    2323    P:setButton(2, 3, {
    24             ["button"] = winMgr:getWindow("orxonox/MultiplayerBackButton"),
     24            ["button"] = P.window:getChild("MultiplayerBackButton"),
    2525            ["callback"]  = P.MultiplayerBackButton_clicked
    2626    })
     
    3131
    3232    if P.joinMode == 1 then
    33         local window = winMgr:getWindow("orxonox/MultiplayerLanButton")
     33        local window = P.window:getChild("MultiplayerWindow/MultiplayerLanButton")
    3434        local button = tolua.cast(window,"CEGUI::RadioButton")
    3535        button:setSelected(true)
    3636    end
    3737    if P.joinMode == 2 then
    38         local window = winMgr:getWindow("orxonox/MultiplayerInternetButton")
     38        local window = P.window:getChild("MultiplayerWindow/MultiplayerInternetButton")
    3939        local button = tolua.cast(window,"CEGUI::RadioButton")
    4040        button:setSelected(true)
     
    6666
    6767function P.MultiplayerJoinButton_clicked(e)
    68     local choice = winMgr:getWindow("orxonox/MultiplayerListbox"):getFirstSelectedItem()
     68    local choice = P.window:getChild("MultiplayerWindow/MultiplayerListbox"):getFirstSelectedItem()
    6969    local destination = nil
    7070    if choice then
     
    8585    -- LAN Discovery
    8686    if P.joinMode == 1 then
    87         local listbox = winMgr:getWindow("orxonox/MultiplayerListbox")
     87        local listbox = P.window:getChild("MultiplayerWindow/MultiplayerListbox")
    8888        CEGUI.toListbox(listbox):resetList()
    8989        local discovery = orxonox.LANDiscovery:getInstance()
     
    120120    -- WAN Discovery
    121121    elseif P.joinMode == 2 then
    122         local listbox = winMgr:getWindow("orxonox/MultiplayerListbox")
     122        local listbox = P.window:getChild("MultiplayerWindow/MultiplayerListbox")
    123123        CEGUI.toListbox(listbox):resetList()
    124124        local discovery = orxonox.WANDiscovery()
Note: See TracChangeset for help on using the changeset viewer.