Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7639


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

Some performance an GUI enhancement.

Location:
code/branches/releasetodo
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/releasetodo/data/gui/layouts/SingleplayerMenu.layout

    r7626 r7639  
    2020                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.85,0}}" />
    2121            </Window>
    22             <Window Type="MenuWidgets/RadioButton" Name="orxonox/SingleplayerShowRestrictedButton" >
    23                 <Property Name="Text" Value="show only restricted" />
    24                 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    25                 <Property Name="UnifiedAreaRect" Value="{{0.15,0},{0.87,0},{0.5,0},{.97,0}}" />
    26                 <Event Name="SelectStateChanged" Function="SingleplayerMenu.SingleplayerShowRestrictedButton_clicked"/>
    27             </Window>
    28             <Window Type="MenuWidgets/RadioButton" Name="orxonox/SingleplayerShowAllButton" >
     22            <Window Type="MenuWidgets/Checkbox" Name="orxonox/SingleplayerShowAllCheckbox" >
    2923                <Property Name="Text" Value="show all" />
    3024                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    31                 <Property Name="UnifiedAreaRect" Value="{{0.65,0},{0.87,0},{0.85,0},{.97,0}}" />
    32                 <Event Name="SelectStateChanged" Function="SingleplayerMenu.SingleplayerShowAllButton_clicked"/>
     25                <Property Name="UnifiedAreaRect" Value="{{0.65,0},{0.87,0},{0.8,0},{.97,0}}" />
     26                <Event Name="CheckStateChanged" Function="SingleplayerMenu.SingleplayerShowAll_clicked"/>
    3327            </Window>
    3428        </Window>
  • 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
  • code/branches/releasetodo/src/orxonox/LevelInfo.cc

    r7638 r7639  
    120120        if(!this->validateTag(tag))
    121121        {
    122             COUT(2) << "Bad tag '" << tag << "' in " << this->getXMLFilename() << ". Ignoring..." << std::endl;
     122            COUT(2) << "Bad LevelInfo tag '" << tag << "' in " << this->getXMLFilename() << ". Ignoring..." << std::endl;
    123123            return false;
    124124        }
    125         bool success = this->tags_.insert(std::string(tag)).second;
     125        bool success = this->tags_.insert(*LevelInfoItem::possibleTags_s.find(tag)).second;
    126126        if(update && success)
    127127            this->tagsUpdated();
Note: See TracChangeset for help on using the changeset viewer.