Changeset 7647 for code/branches/releasetodo/data/gui/scripts
- Timestamp:
- Nov 13, 2010, 11:30:06 PM (14 years ago)
- Location:
- code/branches/releasetodo/data/gui/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/releasetodo/data/gui/scripts/MultiplayerMenu.lua
r7627 r7647 16 16 local button = tolua.cast(window,"CEGUI::RadioButton") 17 17 button:setSelected(true) 18 local checkbox = winMgr:getWindow("orxonox/MultiplayerShowAllCheckbox") 19 checkbox:setProperty("Disabled", "True") 18 20 P.showServerList() 19 21 end … … 22 24 local button = tolua.cast(window,"CEGUI::RadioButton") 23 25 button:setSelected(true) 26 local checkbox = winMgr:getWindow("orxonox/MultiplayerShowAllCheckbox") 27 checkbox:setProperty("Disabled", "False") 24 28 P.showLevelList() 25 29 end … … 28 32 local button = tolua.cast(window,"CEGUI::RadioButton") 29 33 button:setSelected(true) 34 local checkbox = winMgr:getWindow("orxonox/MultiplayerShowAllCheckbox") 35 checkbox:setProperty("Disabled", "True") 30 36 P.showLevelList() 31 37 end … … 34 40 function P.MultiplayerJoinButton_clicked(e) 35 41 P.multiplayerMode = "startClient" 42 local checkbox = winMgr:getWindow("orxonox/MultiplayerShowAllCheckbox") 43 checkbox:setProperty("Disabled", "True") 36 44 P.showServerList() 37 45 end … … 39 47 function P.MultiplayerHostButton_clicked(e) 40 48 P.multiplayerMode = "startServer" 49 local checkbox = winMgr:getWindow("orxonox/MultiplayerShowAllCheckbox") 50 checkbox:setProperty("Disabled", "False") 41 51 P.showLevelList() 42 52 end … … 44 54 function P.MultiplayerDedicatedButton_clicked(e) 45 55 P.multiplayerMode = "startDedicated" 56 local checkbox = winMgr:getWindow("orxonox/MultiplayerShowAllCheckbox") 57 checkbox:setProperty("Disabled", "True") 46 58 P.showLevelList() 59 end 60 61 function P.MultiplayerShowAll_clicked(e) 62 local checkbox = tolua.cast(winMgr:getWindow("orxonox/MultiplayerShowAllCheckbox"), "CEGUI::Checkbox") 63 local show = checkbox:isSelected() 64 if show ~= P.showAll then 65 P.showAll = show 66 P.createLevelList() 67 end 47 68 end 48 69 … … 95 116 index = index + 1 96 117 end 97 --TODO: Reintroduce sorting, if needed. 118 --TODO: Reintroduce sorting, if needed. At the moment it's sorted by filename. 98 119 --table.sort(levelList) 99 120 for k,v in pairs(P.levelList) do … … 105 126 end 106 127 P.itemList[k] = listbox:getListboxItemFromIndex(k-1) 107 --TODO: The description as tooltip would be nice.108 --local lItem = P.itemList[k]109 --lItem:setTooltipText(v:getDescription())110 128 orxonox.GUIManager:setTooltipTextHelper(P.itemList[k], v:getDescription()) 111 129 end -
code/branches/releasetodo/data/gui/scripts/SingleplayerMenu.lua
r7639 r7647 33 33 index = index + 1 34 34 end 35 --TODO: Reintroduce sorting, if needed. 35 --TODO: Reintroduce sorting, if needed. At the moment it's sorted by filename. 36 36 --table.sort(levelList) 37 37 for k,v in pairs(P.levelList) do … … 43 43 end 44 44 P.itemList[k] = listbox:getListboxItemFromIndex(k-1) 45 --TODO: The description as tooltip would be nice.46 --local lItem = tolua.cast("CEGUI::ListboxItem", P.itemList[k])47 --lItem:setTooltipText(v:getDescription())48 45 orxonox.GUIManager:setTooltipTextHelper(P.itemList[k], v:getDescription()) 49 46 end
Note: See TracChangeset
for help on using the changeset viewer.