X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Foptions_menu.cpp;h=509c85d160098882dee795e99887d045c9b74778;hb=ca86583fae991aa3280c5d70bf20dbf0504a93cb;hp=495e0f7f1494241f249c439bdac4381fdf4070e4;hpb=acd1950b9b853d6b7c56a2cb43e77ec3147b2369;p=supertux.git diff --git a/src/options_menu.cpp b/src/options_menu.cpp index 495e0f7f1..509c85d16 100644 --- a/src/options_menu.cpp +++ b/src/options_menu.cpp @@ -1,5 +1,8 @@ // $Id$ +// +// SuperTux // Copyright (C) 2004 Tobas Glaesser +// Copyright (C) 2006 Matthias Braun // // 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"));