mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-22 15:02:54 -04:00
Added sounds to Reset & Quit modals (#718)
Co-authored-by: MelonSpeedruns <melonspeedruns@stratobox.net>
This commit is contained in:
@@ -68,12 +68,17 @@ MenuBar::MenuBar() : Document(kDocumentSource), mRoot(mDocument->GetElementById(
|
||||
{
|
||||
ModalAction{
|
||||
.label = "Cancel",
|
||||
.onPressed = dismiss,
|
||||
.onPressed =
|
||||
[this, dismiss](Modal& modal) {
|
||||
mDoAud_seStartMenu(kSoundWindowClose);
|
||||
dismiss(modal);
|
||||
},
|
||||
},
|
||||
ModalAction{
|
||||
.label = "Reset",
|
||||
.onPressed =
|
||||
[this, dismiss](Modal& modal) {
|
||||
mDoAud_seStartMenu(kSoundClick);
|
||||
if (fpcM_SearchByName(fpcNm_LOGO_SCENE_e)) {
|
||||
dismiss(modal);
|
||||
return;
|
||||
@@ -98,12 +103,17 @@ MenuBar::MenuBar() : Document(kDocumentSource), mRoot(mDocument->GetElementById(
|
||||
{
|
||||
ModalAction{
|
||||
.label = "Cancel",
|
||||
.onPressed = dismiss,
|
||||
.onPressed =
|
||||
[dismiss](Modal& modal) {
|
||||
mDoAud_seStartMenu(kSoundWindowClose);
|
||||
dismiss(modal);
|
||||
},
|
||||
},
|
||||
ModalAction{
|
||||
.label = "Quit",
|
||||
.onPressed =
|
||||
[dismiss](Modal& modal) {
|
||||
mDoAud_seStartMenu(kSoundClick);
|
||||
dismiss(modal);
|
||||
IsRunning = false;
|
||||
},
|
||||
|
||||
@@ -36,6 +36,8 @@ Modal::Modal(Props props) : WindowSmall("modal", "modal-dialog"), mProps(std::mo
|
||||
});
|
||||
mButtons.push_back(std::move(btn));
|
||||
}
|
||||
|
||||
mDoAud_seStartMenu(kSoundWindowOpen);
|
||||
}
|
||||
|
||||
bool Modal::focus() {
|
||||
|
||||
Reference in New Issue
Block a user