mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-27 21:01:37 +00:00
achievement_menu: improved outro animation
This commit is contained in:
parent
f1448b12e2
commit
dcd31ffab6
2 changed files with 5 additions and 3 deletions
|
|
@ -8,7 +8,7 @@
|
||||||
float g_achievementMenuIntroTime = 0.0f;
|
float g_achievementMenuIntroTime = 0.0f;
|
||||||
constexpr float g_achievementMenuIntroThreshold = 3.0f;
|
constexpr float g_achievementMenuIntroThreshold = 3.0f;
|
||||||
float g_achievementMenuOutroTime = 0.0f;
|
float g_achievementMenuOutroTime = 0.0f;
|
||||||
constexpr float g_achievementMenuOutroThreshold = 0.42f;
|
constexpr float g_achievementMenuOutroThreshold = 0.32f;
|
||||||
bool g_isAchievementMenuOutro = false;
|
bool g_isAchievementMenuOutro = false;
|
||||||
|
|
||||||
void CHudPauseAddOptionsItemMidAsmHook(PPCRegister& pThis)
|
void CHudPauseAddOptionsItemMidAsmHook(PPCRegister& pThis)
|
||||||
|
|
@ -136,7 +136,7 @@ PPC_FUNC(sub_824B0930)
|
||||||
if (g_achievementMenuIntroThreshold >= g_achievementMenuIntroTime)
|
if (g_achievementMenuIntroThreshold >= g_achievementMenuIntroTime)
|
||||||
__imp__sub_824B0930(ctx, base);
|
__imp__sub_824B0930(ctx, base);
|
||||||
|
|
||||||
if (pInputState->GetPadState().IsTapped(SWA::eKeyState_B))
|
if (pInputState->GetPadState().IsTapped(SWA::eKeyState_B) && !g_isAchievementMenuOutro)
|
||||||
{
|
{
|
||||||
AchievementMenu::Close();
|
AchievementMenu::Close();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -355,7 +355,9 @@ static void DrawContentContainer()
|
||||||
auto drawList = ImGui::GetForegroundDrawList();
|
auto drawList = ImGui::GetForegroundDrawList();
|
||||||
|
|
||||||
// Expand/retract animation.
|
// 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
|
auto minX = g_isClosing
|
||||||
? Hermite(256, 306, motion)
|
? Hermite(256, 306, motion)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue