[Menu] added setFocusBody()
This commit is contained in:
+5
@@ -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;
|
||||||
|
|||||||
@@ -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;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user