From: Holger Schemel Date: Tue, 7 Apr 2015 15:51:13 +0000 (+0200) Subject: added sound definitions for pressing and releasing main menu buttons X-Git-Tag: 4.0.0.0-rc1~217 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=84c72edcfa6093ca6c82687ace4b23b1959dba39 added sound definitions for pressing and releasing main menu buttons --- 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 */ {