Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 13, 2010, 11:30:06 PM (14 years ago)
Author:
dafrick
Message:

Some final adjustments, before merge.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/releasetodo/data/gui/scripts/MultiplayerMenu.lua

    r7627 r7647  
    1616        local button = tolua.cast(window,"CEGUI::RadioButton")
    1717        button:setSelected(true)
     18        local checkbox = winMgr:getWindow("orxonox/MultiplayerShowAllCheckbox")
     19        checkbox:setProperty("Disabled", "True")
    1820        P.showServerList()
    1921    end
     
    2224        local button = tolua.cast(window,"CEGUI::RadioButton")
    2325        button:setSelected(true)
     26        local checkbox = winMgr:getWindow("orxonox/MultiplayerShowAllCheckbox")
     27        checkbox:setProperty("Disabled", "False")
    2428        P.showLevelList()
    2529    end
     
    2832        local button = tolua.cast(window,"CEGUI::RadioButton")
    2933        button:setSelected(true)
     34        local checkbox = winMgr:getWindow("orxonox/MultiplayerShowAllCheckbox")
     35        checkbox:setProperty("Disabled", "True")
    3036        P.showLevelList()
    3137    end
     
    3440function P.MultiplayerJoinButton_clicked(e)
    3541    P.multiplayerMode = "startClient"
     42    local checkbox = winMgr:getWindow("orxonox/MultiplayerShowAllCheckbox")
     43    checkbox:setProperty("Disabled", "True")
    3644    P.showServerList()
    3745end
     
    3947function P.MultiplayerHostButton_clicked(e)
    4048    P.multiplayerMode = "startServer"
     49    local checkbox = winMgr:getWindow("orxonox/MultiplayerShowAllCheckbox")
     50    checkbox:setProperty("Disabled", "False")
    4151    P.showLevelList()
    4252end
     
    4454function P.MultiplayerDedicatedButton_clicked(e)
    4555    P.multiplayerMode = "startDedicated"
     56    local checkbox = winMgr:getWindow("orxonox/MultiplayerShowAllCheckbox")
     57    checkbox:setProperty("Disabled", "True")
    4658    P.showLevelList()
     59end
     60
     61function 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
    4768end
    4869
     
    95116        index = index + 1
    96117    end
    97     --TODO: Reintroduce sorting, if needed.
     118    --TODO: Reintroduce sorting, if needed. At the moment it's sorted by filename.
    98119    --table.sort(levelList)
    99120    for k,v in pairs(P.levelList) do
     
    105126        end
    106127        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())
    110128        orxonox.GUIManager:setTooltipTextHelper(P.itemList[k], v:getDescription())
    111129    end
Note: See TracChangeset for help on using the changeset viewer.