mirror of
https://github.com/J-D-K/JKSV.git
synced 2026-09-07 10:06:00 -05:00
Make ui::TitleView use ui::Transition for scrolling.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "ui/ColorMod.hpp"
|
||||
#include "ui/Element.hpp"
|
||||
#include "ui/TitleTile.hpp"
|
||||
#include "ui/Transition.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -49,8 +50,8 @@ namespace ui
|
||||
/// @brief Pointer to user passed.
|
||||
data::User *m_user{};
|
||||
|
||||
/// @brief Y coordinate.
|
||||
double m_y = 32.0f;
|
||||
/// @brief Transition used for animating the scrolling.
|
||||
ui::Transition m_transition{};
|
||||
|
||||
/// @brief Currently highlighted/selected title.
|
||||
int m_selected{};
|
||||
|
||||
@@ -99,7 +99,10 @@ namespace ui
|
||||
/// @brief Sets the threshold before snapping occurs.
|
||||
void set_threshold(int threshold) noexcept;
|
||||
|
||||
static inline int DEFAULT_THRESHOLD = 2;
|
||||
/// @brief Updates the scaling for all transitions.
|
||||
static void update_scaling() noexcept;
|
||||
|
||||
static inline int DEFAULT_THRESHOLD = 1;
|
||||
|
||||
private:
|
||||
/// @brief Current X.
|
||||
@@ -130,7 +133,7 @@ namespace ui
|
||||
double m_threshold{};
|
||||
|
||||
/// @brief Scaling from config.
|
||||
double m_scaling{};
|
||||
static inline double sm_scaling{};
|
||||
|
||||
void update_x_coord() noexcept;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user