mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-21 22:54:37 -04:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user