[Menu] added setFocusBody()

This commit is contained in:
Raphael Coeffic
2021-06-06 13:53:05 +02:00
parent 880a514f18
commit 8d02f3884a
2 changed files with 7 additions and 0 deletions
+5
View File
@@ -181,6 +181,11 @@ class Menu: public ModalWindow
waitHandler = std::move(handler); waitHandler = std::move(handler);
} }
void setFocusBody(uint8_t flag = SET_FOCUS_DEFAULT)
{
content->body.setFocus(flag);
}
void setToolbar(Window * window) void setToolbar(Window * window)
{ {
toolbar = window; toolbar = window;
+2
View File
@@ -156,9 +156,11 @@ class MenuToolbar: public FormGroup {
choice->fillMenu(menu, [=](int16_t index) { choice->fillMenu(menu, [=](int16_t index) {
return index >= filtermin && index <= filtermax; return index >= filtermin && index <= filtermax;
}); });
menu->setFocusBody();
} }
else { else {
choice->fillMenu(menu); choice->fillMenu(menu);
menu->setFocusBody();
} }
return 1; return 1;
}); });