| 16 | } |
| 17 | |
| 18 | bool 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 | |
| 47 | void SliderComponent::update(int deltaTime) |
| 48 | { |
nothing calls this directly
no test coverage detected