mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-17 13:32:38 +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
|
tic_t ticker; // How long the menu's been open for
|
||||||
INT16 offset; // To make the icons move smoothly when we transition!
|
INT16 offset; // To make the icons move smoothly when we transition!
|
||||||
|
menu_anim_t move;
|
||||||
|
|
||||||
UINT16 currentunlock;
|
UINT16 currentunlock;
|
||||||
char *unlockcondition;
|
char *unlockcondition;
|
||||||
|
|
|
||||||
|
|
@ -6871,6 +6871,8 @@ void M_DrawChallenges(void)
|
||||||
|
|
||||||
x += challengesmenu.offset;
|
x += challengesmenu.offset;
|
||||||
|
|
||||||
|
x += Easing_OutQuad(M_DueFrac(challengesmenu.move.start, 4), challengesgridstep * challengesmenu.move.dist, 0);
|
||||||
|
|
||||||
if (challengegridloops)
|
if (challengegridloops)
|
||||||
{
|
{
|
||||||
if (!challengesmenu.col && challengesmenu.hilix)
|
if (!challengesmenu.col && challengesmenu.hilix)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
/// \file menus/extras-challenges.c
|
/// \file menus/extras-challenges.c
|
||||||
/// \brief Challenges.
|
/// \brief Challenges.
|
||||||
|
|
||||||
|
#include "../i_time.h"
|
||||||
#include "../k_menu.h"
|
#include "../k_menu.h"
|
||||||
#include "../m_cond.h" // Condition Sets
|
#include "../m_cond.h" // Condition Sets
|
||||||
#include "../m_random.h" // And just some randomness for the exits.
|
#include "../m_random.h" // And just some randomness for the exits.
|
||||||
|
|
@ -862,6 +863,11 @@ boolean M_ChallengesInputs(INT32 ch)
|
||||||
{
|
{
|
||||||
challengesmenu.focusx--;
|
challengesmenu.focusx--;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
challengesmenu.move.dist = 1;
|
||||||
|
challengesmenu.move.start = I_GetTime();
|
||||||
|
}
|
||||||
|
|
||||||
// Step the actual column right.
|
// Step the actual column right.
|
||||||
if (challengesmenu.col < gamedata->challengegridwidth-1)
|
if (challengesmenu.col < gamedata->challengegridwidth-1)
|
||||||
|
|
@ -899,6 +905,11 @@ boolean M_ChallengesInputs(INT32 ch)
|
||||||
{
|
{
|
||||||
challengesmenu.focusx++;
|
challengesmenu.focusx++;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
challengesmenu.move.dist = -1;
|
||||||
|
challengesmenu.move.start = I_GetTime();
|
||||||
|
}
|
||||||
|
|
||||||
// Step the actual column left.
|
// Step the actual column left.
|
||||||
if (challengesmenu.col > 0)
|
if (challengesmenu.col > 0)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue