From 84c72edcfa6093ca6c82687ace4b23b1959dba39 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Tue, 7 Apr 2015 17:51:13 +0200 Subject: [PATCH] added sound definitions for pressing and releasing main menu buttons --- src/conf_snd.c | 3 +++ src/screens.c | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/src/conf_snd.c b/src/conf_snd.c index fa6ae334..c57e7ea1 100644 --- a/src/conf_snd.c +++ b/src/conf_snd.c @@ -257,6 +257,9 @@ struct ConfigInfo sound_config[] = { "menu.item.activating", "empty.wav" }, { "menu.item.selecting", "base.wav" }, + { "menu.button.pressing", UNDEFINED_FILENAME }, + { "menu.button.releasing", UNDEFINED_FILENAME }, + { "background.TITLE_INITIAL", UNDEFINED_FILENAME }, { "background.TITLE", UNDEFINED_FILENAME }, { "background.MAIN", UNDEFINED_FILENAME }, diff --git a/src/screens.c b/src/screens.c index 6757061e..212e2b4c 100644 --- a/src/screens.c +++ b/src/screens.c @@ -1764,7 +1764,14 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button) button_pressed = TRUE; if (button_pressed != button_pressed_last) + { DrawCursorAndText_Main(choice, TRUE, button_pressed); + + if (button_pressed) + PlaySound(SND_MENU_BUTTON_PRESSING); + else + PlaySound(SND_MENU_BUTTON_RELEASING); + } } else if (dx || dy) /* keyboard input */ { -- 2.34.1