Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 23, 2009, 8:45:56 PM (15 years ago)
Author:
rgrieder
Message:

Mood changes should now be working and with immediate (but delayed because of loading) effect.

Location:
code/branches/presentation2/data/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/data/gui/layouts/AudioMenu.layout

    r6363 r6406  
    111111            </Window>
    112112            <Window Type="TaharezLook/StaticText" Name="orxonox/AudioInfo" >
    113                 <Property Name="Text" >Theme changes require
    114 a game restart.</Property>
     113                <Property Name="Text" >Theme changes might take
     114up to a minute.</Property>
    115115                <Property Name="TextColours" Value="FF4444FF" />
    116116                <Property Name="InheritsAlpha" Value="False" />
  • code/branches/presentation2/data/gui/scripts/AudioMenu.lua

    r6403 r6406  
    4545        item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
    4646        CEGUI.toListbox(listboxwindow):addItem(item)
     47    end
     48    if orxonox.getConfig("MoodManager", "mood_") == "dnb" then
     49        listboxwindow:setItemSelectState(1,true)
     50    else
     51        listboxwindow:setItemSelectState(0,true)
    4752    end
    4853end
     
    166171function P.AudioThemeListbox_changed(e)
    167172    if listboxwindow:isItemSelected(1) then
    168         orxonox.execute("setMood dnb")
     173        orxonox.config("MoodManager", "mood_", "dnb")
    169174    else
    170         orxonox.execute("setMood default")
     175        orxonox.config("MoodManager", "mood_", "default")
    171176    end
    172177end
Note: See TracChangeset for help on using the changeset viewer.