mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-06 15:47:39 +03:00
Fix scrolling wrap-around in settings menu
This commit is contained in:
parent
14972b34cb
commit
29cb9634b5
@ -114,11 +114,9 @@ void SettingsActivity::loop() {
|
||||
updateRequired = true;
|
||||
} else if (mappedInput.wasPressed(MappedInputManager::Button::Down) ||
|
||||
mappedInput.wasPressed(MappedInputManager::Button::Right)) {
|
||||
// Move selection down
|
||||
if (selectedSettingIndex < settingsCount - 1) {
|
||||
selectedSettingIndex++;
|
||||
updateRequired = true;
|
||||
}
|
||||
// Move selection down (with wrap around)
|
||||
selectedSettingIndex = (selectedSettingIndex < settingsCount - 1) ? (selectedSettingIndex + 1) : 0;
|
||||
updateRequired = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user