22 static const std::vector<int>
STEPS;
52 void draw(
int scaledFontSize)
const override;
62 static float _trackX(
float panelX);
63 static float _trackY(
float panelY,
float panelH);
64 static float _trackW(
float panelW);
Self-contained speed slider widget.
static constexpr int PANEL_HEIGHT
static float _trackY(float panelY, float panelH)
void draw(int scaledFontSize) const override
Draws the slider panel at the bottom-left of the screen.
static float _trackW(float panelW)
std::optional< int > getPendingSpeedChange()
Returns and clears any pending speed change.
void syncFromServer(int serverTimeUnit)
Snaps to the nearest step index matching serverTimeUnit. No-op if already initialized or serverTimeUn...
static const std::vector< int > STEPS
void reset()
Resets slider state. Call on reconnect so it re-syncs from the new server.
static constexpr int PANEL_WIDTH
std::optional< int > _pendingSpeed
static float _trackX(float panelX)
bool handleInput() override
Processes mouse input.