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

Method input

src/components/SliderComponent.cpp:18–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16}
17
18bool SliderComponent::input(InputConfig* config, Input input)
19{
20 if(config->isMappedTo("left", input))
21 {
22 if(input.value)
23 mMoveRate = -mIncrement;
24 else
25 mMoveRate = 0;
26
27 //setting mRepeatWaitTimer to 0 will trigger an initial move in our update method
28 mRepeatWaitTimer = 0;
29
30 return true;
31 }
32 if(config->isMappedTo("right", input))
33 {
34 if(input.value)
35 mMoveRate = mIncrement;
36 else
37 mMoveRate = 0;
38
39 mRepeatWaitTimer = 0;
40
41 return true;
42 }
43
44 return GuiComponent::input(config, input);
45}
46
47void SliderComponent::update(int deltaTime)
48{

Callers

nothing calls this directly

Calls 1

isMappedToMethod · 0.80

Tested by

no test coverage detected