diff --git a/src/k_menu.h b/src/k_menu.h index 454e314f8..9ab7da97c 100644 --- a/src/k_menu.h +++ b/src/k_menu.h @@ -1320,6 +1320,7 @@ extern struct challengesmenu_s { tic_t ticker; // How long the menu's been open for INT16 offset; // To make the icons move smoothly when we transition! + menu_anim_t move; UINT16 currentunlock; char *unlockcondition; diff --git a/src/k_menudraw.c b/src/k_menudraw.c index cd532f944..2c6923f11 100644 --- a/src/k_menudraw.c +++ b/src/k_menudraw.c @@ -6865,6 +6865,8 @@ void M_DrawChallenges(void) x += challengesmenu.offset; + x += Easing_OutQuad(M_DueFrac(challengesmenu.move.start, 4), challengesgridstep * challengesmenu.move.dist, 0); + if (challengegridloops) { if (!challengesmenu.col && challengesmenu.hilix) diff --git a/src/menus/extras-challenges.c b/src/menus/extras-challenges.c index e67aca51e..53b72c2ce 100644 --- a/src/menus/extras-challenges.c +++ b/src/menus/extras-challenges.c @@ -1,6 +1,7 @@ /// \file menus/extras-challenges.c /// \brief Challenges. +#include "../i_time.h" #include "../k_menu.h" #include "../m_cond.h" // Condition Sets #include "../m_random.h" // And just some randomness for the exits. @@ -882,6 +883,11 @@ boolean M_ChallengesInputs(INT32 ch) { challengesmenu.focusx--; } + else + { + challengesmenu.move.dist = 1; + challengesmenu.move.start = I_GetTime(); + } // Step the actual column right. if (challengesmenu.col < gamedata->challengegridwidth-1) @@ -919,6 +925,11 @@ boolean M_ChallengesInputs(INT32 ch) { challengesmenu.focusx++; } + else + { + challengesmenu.move.dist = -1; + challengesmenu.move.start = I_GetTime(); + } // Step the actual column left. if (challengesmenu.col > 0)