Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8325


Ignore:
Timestamp:
Apr 25, 2011, 10:09:04 AM (14 years ago)
Author:
dafrick
Message:

AudioMenu is only accessible if the SoundManager exists.

Location:
code/branches/kicklib2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib2/data/gui/scripts/SettingsMenu.lua

    r8079 r8325  
    3535end
    3636
     37function P.onShow()
     38    local window = winMgr:getWindow("orxonox/SettingsMenu/AudioButton")
     39    if not orxonox.SoundManager:exists() then
     40        window:setProperty("Disabled", "true")
     41    else
     42        window:setProperty("Disabled", "false")
     43    end
     44end
     45
    3746function P.SettingsGameplayButton_clicked(e)
    3847    showMenuSheet("GameplayMenu", true)
  • code/branches/kicklib2/src/orxonox/sound/SoundManager.h

    r7858 r8325  
    7272        // tolua_begin
    7373        static SoundManager& getInstance() { return Singleton<SoundManager>::getInstance(); }
     74        static bool exists() { return Singleton<SoundManager>::exists(); }
    7475
    7576        std::string getDeviceName(unsigned int index) const
Note: See TracChangeset for help on using the changeset viewer.