Add get current selection index

This commit is contained in:
Cliff
2021-09-08 06:25:11 +02:00
committed by Raphael Coeffic
parent 2c5ed7e3ad
commit 8bde45bb86
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -94,6 +94,7 @@ bool MenuBody::onTouchEnd(coord_t /*x*/, coord_t y)
menu->invalidate();
}
else {
select(index);
menu->deleteLater();
lines[index].onPress();
}
+5
View File
@@ -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);