mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-14 10:27:45 +00:00
Added back
Added the ability to use the Up and Left buttons simultaneously to cause the cursor to move to the top left of the screen
This commit is contained in:
@@ -179,7 +179,14 @@ void FocusManager::update(
|
||||
};
|
||||
|
||||
const auto nearest = std::min_element(collection.cbegin(), collection.cend(), compare_fn);
|
||||
if( nearest != collection.cend() ) {
|
||||
// Up and left to indicate back
|
||||
if (event == KeyEvent::Back) {
|
||||
collection.clear();
|
||||
widget_collect_visible(top_widget, find_back_fn, collection);
|
||||
if (!collection.empty())
|
||||
set_focus_widget(collection[0].first);
|
||||
}
|
||||
else if( nearest != collection.cend() ) {
|
||||
//focus->blur();
|
||||
const auto new_focus = (*nearest).first;
|
||||
set_focus_widget(new_focus);
|
||||
|
Reference in New Issue
Block a user