Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Some performance an GUI enhancement.

File:
1 edited

Legend:

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

    r7627 r7639  
    88
    99function P.onLoad()
    10     local window = winMgr:getWindow("orxonox/SingleplayerShowRestrictedButton")
    11     local button = tolua.cast(window,"CEGUI::RadioButton")
    12     button:setSelected(true)
     10    local window = winMgr:getWindow("orxonox/SingleplayerShowAllCheckbox")
     11    local button = tolua.cast(window,"CEGUI::Checkbox")
     12    button:setSelected(false)
    1313    P.createLevelList()
    1414end
     
    6464end
    6565
    66 function P.SingleplayerShowRestrictedButton_clicked(e)
    67     P.showAll = false
    68     P.createLevelList()
    69 end
    70 
    71 function P.SingleplayerShowAllButton_clicked(e)
    72     P.showAll = true
    73     P.createLevelList()
     66function P.SingleplayerShowAll_clicked(e)
     67    local checkbox = tolua.cast(winMgr:getWindow("orxonox/SingleplayerShowAllCheckbox"), "CEGUI::Checkbox")
     68    local show = checkbox:isSelected()
     69    if show ~= P.showAll then
     70        P.showAll = show
     71        P.createLevelList()
     72   end
    7473end
    7574
Note: See TracChangeset for help on using the changeset viewer.