Alternate RMLUI Menu Sounds (#686)

* Alternate RMLUI Menu Sounds

Those fit more the game I feel like.

* swapped tab sounds

* pressing A on tab button plays the OK sound

* Fix tab sound + Added menu sounds to prelaunch menu

* Centralize UI sound definitions

* Improvements

* Add "Play" button sound

* Use kSoundItemFocus in prelaunch

* Oops

* Update play/enable/disable sounds

---------

Co-authored-by: MelonSpeedruns <melonspeedruns@stratobox.net>
Co-authored-by: Luke Street <luke@street.dev>
This commit is contained in:
MelonSpeedruns
2026-05-05 18:44:11 -04:00
committed by GitHub
parent 782a8573e9
commit 945ce3e4bc
18 changed files with 142 additions and 44 deletions
+1 -8
View File
@@ -44,15 +44,8 @@ Document::Document(const Rml::String& source) : mDocument(load_document(source))
if (cmd == NavCommand::None) {
return;
}
auto* prevFocused = mDocument->GetFocusLeafNode();
if (handle_nav_command(event, cmd)) {
event.StopPropagation();
return;
}
if ((cmd == NavCommand::Up || cmd == NavCommand::Down) &&
mDocument->GetFocusLeafNode() != prevFocused)
{
mDoAud_seStartMenu(Z2SE_SY_NAME_CURSOR);
}
});
}
@@ -113,7 +106,7 @@ bool Document::visible() const {
bool Document::handle_nav_command(Rml::Event& event, NavCommand cmd) {
if (cmd == NavCommand::Menu) {
mDoAud_seStartMenu(visible() ? Z2SE_SY_MENU_OUT : Z2SE_SY_MENU_IN);
mDoAud_seStartMenu(visible() ? kSoundMenuClose : kSoundMenuOpen);
toggle();
return true;
}