mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-16 21:12:27 +00:00
Menus/Challenges: interpolate scrolling
This commit is contained in:
parent
3f58a01774
commit
b676d5137e
3 changed files with 14 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -6871,6 +6871,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)
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -862,6 +863,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)
|
||||
|
|
@ -899,6 +905,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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue