Skip to content

Commit 7f53601

Browse files
ManiacVeraDC-SWAT
authored andcommitted
[games-menu] - added more sfx
1 parent 256ba81 commit 7f53601

File tree

3 files changed

+39
-3
lines changed

3 files changed

+39
-3
lines changed

applications/games_menu/modules/module.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -809,9 +809,8 @@ static bool LoadPage(bool change_view, uint8 direction)
809809

810810
if (self.current_page != self.previous_page || change_view)
811811
{
812-
// DISABLE SLIDE SOUND
813-
if (1 != 1 && !change_view && !self.first_menu_load)
814-
ds_sfx_play(DS_SFX_SLIDE);
812+
if (!change_view && !self.first_menu_load)
813+
ds_sfx_play(DS_SFX_CLICK);
815814

816815
for (int i = 0; i < MAX_SIZE_ITEMS; i++)
817816
{
@@ -1220,6 +1219,7 @@ static void StartExit()
12201219
StopCDDA();
12211220
StopShowCover();
12221221
RemoveAll();
1222+
ds_sfx_play(DS_SFX_CLICK);
12231223

12241224
float y = 1.0f;
12251225
self.game_index_selected = -1;

applications/games_menu/modules/preset.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#include "app_menu.h"
1111
#include "app_utils.h"
1212
#include <isoldr.h>
13+
#include <sfx.h>
14+
#include <settings.h>
1315
#include <tsunami/dsapp.h>
1416
#include <tsunami/font.h>
1517
#include <tsunami/anims/logxymover.h>
@@ -1505,6 +1507,22 @@ void ShowPresetMenu(int game_index)
15051507
&menu_data.border_color, &menu_data.control_top_color, &body_color, &menu_data.control_bottom_color,
15061508
&OnViewIndexChangedEvent);
15071509

1510+
char sfx_path[50];
1511+
int volume = GetVolumeFromSettings();
1512+
if (ds_sfx_is_enabled(DS_SFX_CLICK2))
1513+
{
1514+
ds_sfx_get_wav(sfx_path, DS_SFX_CLICK2 - DS_SFX_LAST_STREAM);
1515+
TSU_FormSetSfxCursor(self.preset_menu_form, sfx_path);
1516+
TSU_FormSetSfxVolume(self.preset_menu_form, volume);
1517+
}
1518+
1519+
if (ds_sfx_is_enabled(DS_SFX_CLICK))
1520+
{
1521+
ds_sfx_get_wav(sfx_path, DS_SFX_CLICK - DS_SFX_LAST_STREAM);
1522+
TSU_FormSetSfxClick(self.preset_menu_form, sfx_path);
1523+
TSU_FormSetSfxVolume(self.preset_menu_form, volume);
1524+
}
1525+
15081526
TSU_FormGetObjectsCurrentViewEvent(self.preset_menu_form, &OnGetObjectsCurrentViewEvent);
15091527

15101528
{

applications/games_menu/modules/system_menu.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#include "app_definition.h"
1010
#include "app_menu.h"
1111
#include "app_utils.h"
12+
#include <sfx.h>
13+
#include <settings.h>
1214
#include <tsunami/dsapp.h>
1315
#include <tsunami/font.h>
1416
#include <tsunami/drawables/scene.h>
@@ -158,6 +160,22 @@ void ShowSystemMenu()
158160
, true, true, form_font, &menu_data.border_color, &menu_data.control_top_color, &body_color, &menu_data.control_bottom_color,
159161
&OnSystemViewIndexChangedEvent);
160162

163+
char sfx_path[50];
164+
int volume = GetVolumeFromSettings();
165+
if (ds_sfx_is_enabled(DS_SFX_CLICK2))
166+
{
167+
ds_sfx_get_wav(sfx_path, DS_SFX_CLICK2 - DS_SFX_LAST_STREAM);
168+
TSU_FormSetSfxCursor(self.system_menu_form, sfx_path);
169+
TSU_FormSetSfxVolume(self.system_menu_form, volume);
170+
}
171+
172+
if (ds_sfx_is_enabled(DS_SFX_CLICK))
173+
{
174+
ds_sfx_get_wav(sfx_path, DS_SFX_CLICK - DS_SFX_LAST_STREAM);
175+
TSU_FormSetSfxClick(self.system_menu_form, sfx_path);
176+
TSU_FormSetSfxVolume(self.system_menu_form, volume);
177+
}
178+
161179
{
162180
Label *general_label = TSU_LabelCreate(form_font, "GENERAL", 14, false, false);
163181
TSU_FormAddBottomLabel(self.system_menu_form, general_label);

0 commit comments

Comments
 (0)