| 109 | } |
| 110 | |
| 111 | void ClockOffsetActivity::loop() { |
| 112 | if (mappedInput.wasPressed(MappedInputManager::Button::Back)) { |
| 113 | finish(); |
| 114 | return; |
| 115 | } |
| 116 | |
| 117 | if (mappedInput.wasPressed(MappedInputManager::Button::Confirm)) { |
| 118 | activeField = static_cast<Field>((activeField + 1) % FIELD_COUNT); |
| 119 | requestUpdate(); |
| 120 | return; |
| 121 | } |
| 122 | |
| 123 | buttonNavigator.onNextRelease([this] { |
| 124 | adjustActiveField(+1); |
| 125 | requestUpdate(); |
| 126 | }); |
| 127 | buttonNavigator.onPreviousRelease([this] { |
| 128 | adjustActiveField(-1); |
| 129 | requestUpdate(); |
| 130 | }); |
| 131 | buttonNavigator.onNextContinuous([this] { |
| 132 | adjustActiveField(+1); |
| 133 | requestUpdate(); |
| 134 | }); |
| 135 | buttonNavigator.onPreviousContinuous([this] { |
| 136 | adjustActiveField(-1); |
| 137 | requestUpdate(); |
| 138 | }); |
| 139 | } |
| 140 | |
| 141 | void ClockOffsetActivity::render(RenderLock&&) { |
| 142 | renderer.clearScreen(); |
nothing calls this directly
no test coverage detected