From 454e0e36c9abe8884be61520dd0a4191e149557e Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 5 Aug 2020 00:32:29 +0200 Subject: [PATCH] - added a sound for advancing multi-screen menus. Fixes #100. --- source/core/menu/imagescroller.cpp | 4 ++-- source/core/menu/menu.h | 3 ++- source/games/duke/src/d_menu.cpp | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/source/core/menu/imagescroller.cpp b/source/core/menu/imagescroller.cpp index 0ee93cca6..6affbb6ac 100644 --- a/source/core/menu/imagescroller.cpp +++ b/source/core/menu/imagescroller.cpp @@ -119,7 +119,7 @@ bool DImageScrollerMenu::MenuEvent(int mkey, bool fromcontroller) delete mCurrent; } mCurrent = next; - //gi->MenuSound(GameInterface::ChooseSound); + gi->MenuSound(ChooseSound); } return true; @@ -135,7 +135,7 @@ bool DImageScrollerMenu::MenuEvent(int mkey, bool fromcontroller) delete mCurrent; } mCurrent = next; - //gi->MenuSound(GameInterface::ChooseSound); + gi->MenuSound(ChooseSound); } return true; diff --git a/source/core/menu/menu.h b/source/core/menu/menu.h index 7c04cf30c..e19d84d5e 100644 --- a/source/core/menu/menu.h +++ b/source/core/menu/menu.h @@ -94,7 +94,8 @@ enum EMenuSounds : int BackSound, CloseSound, PageSound, - ChangeSound + ChangeSound, + ChooseSound }; EXTERN_CVAR(Bool, menu_sounds) diff --git a/source/games/duke/src/d_menu.cpp b/source/games/duke/src/d_menu.cpp index 23afc7b80..6b56eae9b 100644 --- a/source/games/duke/src/d_menu.cpp +++ b/source/games/duke/src/d_menu.cpp @@ -231,6 +231,7 @@ void GameInterface::MenuSound(EMenuSounds snd) S_MenuSound(); break; + case ChooseSound: case CursorSound: S_PlaySound(isRR() ? 335 : KICK_HIT, CHAN_AUTO, CHANF_UI); break;