Skip to content

Commit

Permalink
Merge pull request #17 from Unreal-Dan/kurt/return-to-current-slot-wh…
Browse files Browse the repository at this point in the history
…en-edited

kurt/return-to-current-slot-when-edited
  • Loading branch information
Unreal-Dan authored Jan 6, 2024
2 parents aba9b3d + 74d5df7 commit 4bf482e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Helios.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,10 +439,13 @@ void Helios::handle_state_col_select()
if (check_longclick && Button::onLongClick()) {
if (cur_state == STATE_COLOR_SELECT_VAL) {
cur_state = STATE_COLOR_SELECT_SLOT;
// Return to the slot you were editing
menu_selection = selected_slot;
} else {
cur_state = (State)(cur_state + 1);
// reset the menu selection
menu_selection = 0;
}
menu_selection = 0;
}
// get the current color
RGBColor cur = Led::get();
Expand Down Expand Up @@ -539,6 +542,8 @@ bool Helios::handle_state_col_select_quadrant()
case 0: // selected blank
// add blank to set
pat.colorset().set(selected_slot, RGB_OFF);
// Return to the slot you were editing
menu_selection = selected_slot;
// go to slot selection - 1 because we will increment outside here
cur_state = STATE_COLOR_SELECT_SLOT;
return false;
Expand Down

0 comments on commit 4bf482e

Please sign in to comment.