mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-16 20:27:36 -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:
@@ -149,7 +149,7 @@ void SteppedCarousel::apply(int value) {
|
||||
if (nextValue == currentValue) {
|
||||
return;
|
||||
}
|
||||
mDoAud_seStartMenu(Z2SE_SY_NAME_CURSOR);
|
||||
mDoAud_seStartMenu(kSoundItemChange);
|
||||
if (mProps.onChange) {
|
||||
mProps.onChange(nextValue);
|
||||
}
|
||||
@@ -216,6 +216,7 @@ Overlay::Overlay(OverlayProps props)
|
||||
returnButton.root()->SetClass("return", true);
|
||||
auto& resetButton =
|
||||
add_component<Button>(footer, "Reset to default", "footer-button").on_pressed([this] {
|
||||
mDoAud_seStartMenu(kSoundItemChange);
|
||||
reset_default();
|
||||
});
|
||||
resetButton.root()->SetClass("reset", true);
|
||||
@@ -233,15 +234,16 @@ Overlay::Overlay(OverlayProps props)
|
||||
}
|
||||
|
||||
void Overlay::show() {
|
||||
mDoAud_seStartMenu(Z2SE_SY_CURSOR_OK);
|
||||
Document::show();
|
||||
mRoot->SetAttribute("open", "");
|
||||
mDoAud_seStartMenu(kSoundWindowOpen);
|
||||
}
|
||||
|
||||
void Overlay::hide(bool close) {
|
||||
mRoot->RemoveAttribute("open");
|
||||
if (close) {
|
||||
mPendingClose = true;
|
||||
mDoAud_seStartMenu(kSoundWindowClose);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user