MCPcopy Create free account
hub / github.com/Aloshi/EmulationStation / SliderComponent

Method SliderComponent

src/components/SliderComponent.cpp:5–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include "../Renderer.h"
4
5SliderComponent::SliderComponent(Window* window, float min, float max, float increment) : GuiComponent(window),
6 mMin(min), mMax(max), mIncrement(increment), mMoveRate(0), mRepeatWaitTimer(0)
7{
8 assert((min - max) != 0);
9
10 mValue = (max + min) / 2;
11
12 //calculate move scale
13 mMoveScale = ((max - min) * 0.0007f) / increment;
14
15 setSize(128, 32);
16}
17
18bool SliderComponent::input(InputConfig* config, Input input)
19{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected