diff --git a/UnleashedRecomp/patches/ui/CHudPause_patches.cpp b/UnleashedRecomp/patches/ui/CHudPause_patches.cpp index a211329d..97948d2d 100644 --- a/UnleashedRecomp/patches/ui/CHudPause_patches.cpp +++ b/UnleashedRecomp/patches/ui/CHudPause_patches.cpp @@ -8,7 +8,7 @@ float g_achievementMenuIntroTime = 0.0f; constexpr float g_achievementMenuIntroThreshold = 3.0f; float g_achievementMenuOutroTime = 0.0f; -constexpr float g_achievementMenuOutroThreshold = 0.42f; +constexpr float g_achievementMenuOutroThreshold = 0.32f; bool g_isAchievementMenuOutro = false; void CHudPauseAddOptionsItemMidAsmHook(PPCRegister& pThis) @@ -136,7 +136,7 @@ PPC_FUNC(sub_824B0930) if (g_achievementMenuIntroThreshold >= g_achievementMenuIntroTime) __imp__sub_824B0930(ctx, base); - if (pInputState->GetPadState().IsTapped(SWA::eKeyState_B)) + if (pInputState->GetPadState().IsTapped(SWA::eKeyState_B) && !g_isAchievementMenuOutro) { AchievementMenu::Close(); diff --git a/UnleashedRecomp/ui/achievement_menu.cpp b/UnleashedRecomp/ui/achievement_menu.cpp index c9c601c2..1e10a1ae 100644 --- a/UnleashedRecomp/ui/achievement_menu.cpp +++ b/UnleashedRecomp/ui/achievement_menu.cpp @@ -355,7 +355,9 @@ static void DrawContentContainer() auto drawList = ImGui::GetForegroundDrawList(); // Expand/retract animation. - auto motion = ComputeMotion(g_appearTime, CONTENT_CONTAINER_COMMON_MOTION_START, CONTENT_CONTAINER_COMMON_MOTION_END); + auto motion = g_isClosing + ? ComputeMotion(g_appearTime, 0, CONTENT_CONTAINER_COMMON_MOTION_START) + : ComputeMotion(g_appearTime, CONTENT_CONTAINER_COMMON_MOTION_START, CONTENT_CONTAINER_COMMON_MOTION_END); auto minX = g_isClosing ? Hermite(256, 306, motion)