- add a COLGROUP_MOVING_STATIC (in the future we should try to reduce the number...
[supertux.git] / src / options_menu.cpp
index 495e0f7..509c85d 100644 (file)
@@ -1,5 +1,8 @@
 //  $Id$
+//
+//  SuperTux
 //  Copyright (C) 2004 Tobas Glaesser <tobi.web@gmx.de>
+//  Copyright (C) 2006 Matthias Braun <matze@braunis.de>
 //
 //  This program is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU General Public License
@@ -10,7 +13,7 @@
 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 //  GNU General Public License for more details.
-// 
+//
 //  You should have received a copy of the GNU General Public License
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
@@ -46,9 +49,14 @@ OptionsMenu::OptionsMenu()
   add_label(_("Options"));
   add_hl();
   add_toggle(MNID_FULLSCREEN,_("Fullscreen"), config->use_fullscreen);
-  add_toggle(MNID_SOUND, _("Sound"), config->sound_enabled);
-  add_toggle(MNID_MUSIC, _("Music"), config->music_enabled);
-  add_submenu(_("Setup Keys"), main_controller->get_key_options_menu());
+  if (sound_manager->is_audio_enabled()) {
+    add_toggle(MNID_SOUND, _("Sound"), config->sound_enabled);
+    add_toggle(MNID_MUSIC, _("Music"), config->music_enabled);
+  } else {
+    add_deactive(MNID_SOUND, _("Sound (disabled)"));
+    add_deactive(MNID_SOUND, _("Music (disabled)"));
+  }
+  add_submenu(_("Setup Keyboard"), main_controller->get_key_options_menu());
   add_submenu(_("Setup Joystick"),main_controller->get_joystick_options_menu());
   add_hl();
   add_back(_("Back"));