added sound definitions for pressing and releasing main menu buttons
authorHolger Schemel <info@artsoft.org>
Tue, 7 Apr 2015 15:51:13 +0000 (17:51 +0200)
committerHolger Schemel <info@artsoft.org>
Tue, 7 Apr 2015 15:51:13 +0000 (17:51 +0200)
src/conf_snd.c
src/screens.c

index fa6ae33461ec9f42cd7f9c011ed61bbab5ffee16..c57e7ea11242b48df139375dc96288e0ffdd4f48 100644 (file)
@@ -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              },
index 6757061efb78766868ebd0b08f354ca4073d4aca..212e2b4caf76c05e675f5c5820e5a8932951eedb 100644 (file)
@@ -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 */
   {