From 423c46c008361a31d949b213673daacc9edb2818 Mon Sep 17 00:00:00 2001 From: Treeki Date: Thu, 28 Feb 2013 05:50:15 +0100 Subject: add sounds and fix draw order of message box --- src/msgbox.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/msgbox.cpp') diff --git a/src/msgbox.cpp b/src/msgbox.cpp index 968b607..30ee66e 100644 --- a/src/msgbox.cpp +++ b/src/msgbox.cpp @@ -45,7 +45,7 @@ int dMsgBoxManager_c::onCreate() { layout.loadGroups(groupNames, (int[2]){0,1}, 2); layout.disableAllAnimations(); - layout.drawOrder = 0xA0; + layout.drawOrder = 140; layoutLoaded = true; } @@ -132,6 +132,9 @@ void dMsgBoxManager_c::beginState_BoxAppearWait() { visible = true; MessageBoxIsShowing = true; layout.enableNonLoopAnim(ANIM_BOX_APPEAR); + + nw4r::snd::SoundHandle handle; + PlaySoundWithFunctionB4(SoundRelatedClass, &handle, SE_SYS_KO_DIALOGUE_IN, 1); } void dMsgBoxManager_c::executeState_BoxAppearWait() { @@ -162,6 +165,9 @@ CREATE_STATE(dMsgBoxManager_c, BoxDisappearWait); void dMsgBoxManager_c::beginState_BoxDisappearWait() { layout.enableNonLoopAnim(ANIM_BOX_DISAPPEAR); + + nw4r::snd::SoundHandle handle; + PlaySoundWithFunctionB4(SoundRelatedClass, &handle, SE_SYS_DIALOGUE_OUT_AUTO, 1); } void dMsgBoxManager_c::executeState_BoxDisappearWait() { -- cgit v1.2.3