Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/activities/tools/SleepImagePickerActivity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,13 @@ void SleepImagePickerActivity::loop() {
}

const int items = totalItems();
buttonNavigator.onNext([this, items] { selectorIndex = ButtonNavigator::nextIndex(selectorIndex, items); requestUpdate(); });
buttonNavigator.onPrevious([this, items] { selectorIndex = ButtonNavigator::previousIndex(selectorIndex, items); requestUpdate(); });
// Bind Up/Down explicitly (not via onNext/onPrevious) so Left/Right stay free
// for the Pin/Unpin handler below — otherwise Left's button-down would move
// the cursor before wasReleased(Left) reads selectorIndex.
buttonNavigator.onPressAndContinuous({MappedInputManager::Button::Down},
[this, items] { selectorIndex = ButtonNavigator::nextIndex(selectorIndex, items); requestUpdate(); });
buttonNavigator.onPressAndContinuous({MappedInputManager::Button::Up},
[this, items] { selectorIndex = ButtonNavigator::previousIndex(selectorIndex, items); requestUpdate(); });

if (mappedInput.wasReleased(MappedInputManager::Button::Confirm)) {
if (selectorIndex == MODE_ITEM) {
Expand Down
Loading