Skip to content

Commit

Permalink
fix: reorder key detection in color row
Browse files Browse the repository at this point in the history
so that pressing backspace (delete) gets used by the textinput, if necessary and not by the window
  • Loading branch information
Totto16 committed Oct 28, 2024
1 parent 4e5d913 commit a5cafcc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/scenes/settings_menu/color_setting_row.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,19 @@ bool detail::ColorPickerScene::handle_event(
const SDL_Event& event
) {

const auto result = m_color_picker.handle_event(input_manager, event);
if (result) {
return result;
}

const auto navigation_event = input_manager->get_navigation_event(event);


if (navigation_event == input::NavigationEvent::BACK) {
m_should_exit = true;
return true;
}

const auto result = m_color_picker.handle_event(input_manager, event);
if (result) {
return result;
}

// swallow all events
return true;
Expand Down

0 comments on commit a5cafcc

Please sign in to comment.