- Timestamp:
- Feb 23, 2018, 12:20:35 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cegui0.8_ogre1.9/data/gui/scripts/HostMenu.lua
r11795 r11799 11 11 function P.onLoad() 12 12 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") 15 15 button:setSelected(false) 16 16 P.createLevelList() 17 17 18 18 P:setButton(1, 1, { 19 ["button"] = winMgr:getWindow("orxonox/HostMenuStartButton"),19 ["button"] = P.window:getChild("HostMenuStartButton"), 20 20 ["callback"] = P.HostMenuStartButton_clicked 21 21 }) 22 22 23 23 P:setButton(1, 2, { 24 ["button"] = winMgr:getWindow("orxonox/HostMenuBackButton"),24 ["button"] = P.window:getChild("HostMenuBackButton"), 25 25 ["callback"] = P.HostMenuBackButton_clicked 26 26 }) … … 29 29 function P.onShow() 30 30 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") 33 33 P.showAll = not P.showAll 34 34 button:setSelected(P.showAll) … … 36 36 37 37 if P.multiplayerMode == "startServer" then 38 local window = winMgr:getWindow("orxonox/HostMenuHostButton")38 local window = P.window:getChild("HostMenuWindow/HostMenuHostButton") 39 39 local button = tolua.cast(window,"CEGUI::RadioButton") 40 40 button:setSelected(true) … … 43 43 44 44 if P.multiplayerMode == "startDedicated" then 45 local window = winMgr:getWindow("orxonox/HostMenuDedicatedButton")45 local window = P.window:getChild("HostMenuWindow/HostMenuDedicatedButton") 46 46 local button = tolua.cast(window,"CEGUI::RadioButton") 47 47 button:setSelected(true) … … 53 53 P.levelList = {} 54 54 P.itemList = {} 55 local listbox = CEGUI.toListbox( winMgr:getWindow("orxonox/HostMenuListbox"))55 local listbox = CEGUI.toListbox(P.window:getChild("HostMenuWindow/HostMenuListbox")) 56 56 listbox:resetList() 57 57 orxonox.GUIManager:setItemTooltipsEnabledHelper(listbox, true) … … 98 98 99 99 function P.HostMenuStartButton_clicked(e) 100 local listbox = CEGUI.toListbox( winMgr:getWindow("orxonox/HostMenuListbox"))100 local listbox = CEGUI.toListbox(P.window:getChild("HostMenuWindow/HostMenuListbox")) 101 101 local choice = listbox:getFirstSelectedItem() 102 102 if choice ~= nil then … … 111 111 112 112 function 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") 114 114 local show = checkbox:isSelected() 115 115 if show ~= P.showAll then
Note: See TracChangeset
for help on using the changeset viewer.