- fixed menu sound.

This commit is contained in:
Christoph Oelckers 2020-10-16 23:25:28 +02:00
parent 65c52b9825
commit e636c8044d
3 changed files with 11 additions and 2 deletions

View file

@ -1262,7 +1262,7 @@ void SetDefaultMenuColors()
OptionSettings.mFontColorHighlight = V_FindFontColor(gameinfo.mFontColorHighlight);
OptionSettings.mFontColorSelection = V_FindFontColor(gameinfo.mFontColorSelection);
auto cls = PClass::FindClass("MenuDelegateBase");
auto cls = PClass::FindClass("DoomMenuDelegate");
menuDelegate = cls->CreateNew();
}

View file

@ -63,3 +63,12 @@ class VideoModeMenu : OptionMenu
return false;
}
}
class DoomMenuDelegate : MenuDelegateBase
{
override void PlaySound(Name snd)
{
String s = snd;
S_StartSound (s, CHAN_VOICE, CHANF_UI, snd_menuvolume);
}
}

View file

@ -122,7 +122,7 @@ class OptionMenuItemSubmenu : OptionMenuItem
override bool Activate()
{
Menu.MenuSound("menu/choose");
Menu.MenuSound("menu/advance");
Menu.SetMenu(mAction, mParam);
return true;
}