From 059e6dd54e63b558f3da604996ad00d61ab029cd Mon Sep 17 00:00:00 2001 From: Hyper <34012267+hyperbx@users.noreply.github.com> Date: Sun, 8 Dec 2024 01:17:55 +0000 Subject: [PATCH] CHudPause: added button guide (WIP) Known issues; - The button guide erroneously shows up for Yes/No prompts. --- UnleashedRecomp/patches/ui/CHudPause_patches.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/UnleashedRecomp/patches/ui/CHudPause_patches.cpp b/UnleashedRecomp/patches/ui/CHudPause_patches.cpp index 97948d2..18225bb 100644 --- a/UnleashedRecomp/patches/ui/CHudPause_patches.cpp +++ b/UnleashedRecomp/patches/ui/CHudPause_patches.cpp @@ -2,9 +2,13 @@ #include #include #include +#include #include +#include #include +bool g_isClosed; + float g_achievementMenuIntroTime = 0.0f; constexpr float g_achievementMenuIntroThreshold = 3.0f; float g_achievementMenuOutroTime = 0.0f; @@ -156,6 +160,17 @@ PPC_FUNC(sub_824B0930) { g_achievementMenuIntroTime = 0; + if (pHudPause->m_IsShown && pHudPause->m_Transition == SWA::eTransitionType_Undefined) + { + ButtonGuide::Open(Button(Localise("Achievements_Name"), EButtonIcon::Back, EButtonAlignment::Left, EFontQuality::Low)); + g_isClosed = false; + } + else if (!g_isClosed) + { + ButtonGuide::Close(); + g_isClosed = true; + } + __imp__sub_824B0930(ctx, base); } }