Add get current selection index
This commit is contained in:
+1
@@ -94,6 +94,7 @@ bool MenuBody::onTouchEnd(coord_t /*x*/, coord_t y)
|
||||
menu->invalidate();
|
||||
}
|
||||
else {
|
||||
select(index);
|
||||
menu->deleteLater();
|
||||
lines[index].onPress();
|
||||
}
|
||||
|
||||
+5
@@ -207,6 +207,11 @@ class Menu: public ModalWindow
|
||||
return content->body.count();
|
||||
}
|
||||
|
||||
int selection() const
|
||||
{
|
||||
return content->body.selection();
|
||||
}
|
||||
|
||||
void select(int index)
|
||||
{
|
||||
content->body.select(index);
|
||||
|
||||
Reference in New Issue
Block a user