diff --git a/src/game/client/components/menus_settings.cpp b/src/game/client/components/menus_settings.cpp index 5e2ad214e..4846f27e3 100644 --- a/src/game/client/components/menus_settings.cpp +++ b/src/game/client/components/menus_settings.cpp @@ -1613,20 +1613,8 @@ void CMenus::RenderSettingsSound(CUIRect MainView) UI()->DoLabel(&Label, Localize("Sound"), ButtonHeight*ms_FontmodHeight*0.8f, CUI::ALIGN_CENTER); Sound.HSplitTop(Spacing, 0, &Sound); - Sound.HSplitTop(ButtonHeight, &Button, &Sound); - static int s_ButtonSndEnable = 0; - if(DoButton_CheckBox(&s_ButtonSndEnable, Localize("Use sounds"), g_Config.m_SndEnable, &Button)) - { - g_Config.m_SndEnable ^= 1; - if(g_Config.m_SndEnable) - { - g_Config.m_SndInit = 1; - if(g_Config.m_SndMusic) - m_pClient->m_pSounds->Play(CSounds::CHN_MUSIC, SOUND_MENU, 1.0f); - } - else - m_pClient->m_pSounds->Stop(SOUND_MENU); - } + CUIRect UseSoundButton; + Sound.HSplitTop(ButtonHeight, &UseSoundButton, &Sound); if(g_Config.m_SndEnable) { @@ -1710,6 +1698,20 @@ void CMenus::RenderSettingsSound(CUIRect MainView) } } + static int s_ButtonSndEnable = 0; + if(DoButton_CheckBox(&s_ButtonSndEnable, Localize("Use sounds"), g_Config.m_SndEnable, &UseSoundButton)) + { + g_Config.m_SndEnable ^= 1; + if(g_Config.m_SndEnable) + { + g_Config.m_SndInit = 1; + if(g_Config.m_SndMusic) + m_pClient->m_pSounds->Play(CSounds::CHN_MUSIC, SOUND_MENU, 1.0f); + } + else + m_pClient->m_pSounds->Stop(SOUND_MENU); + } + // reset button MainView.HSplitBottom(60.0f, 0, &BottomView);