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();
|
menu->invalidate();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
select(index);
|
||||||
menu->deleteLater();
|
menu->deleteLater();
|
||||||
lines[index].onPress();
|
lines[index].onPress();
|
||||||
}
|
}
|
||||||
|
|||||||
+5
@@ -207,6 +207,11 @@ class Menu: public ModalWindow
|
|||||||
return content->body.count();
|
return content->body.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int selection() const
|
||||||
|
{
|
||||||
|
return content->body.selection();
|
||||||
|
}
|
||||||
|
|
||||||
void select(int index)
|
void select(int index)
|
||||||
{
|
{
|
||||||
content->body.select(index);
|
content->body.select(index);
|
||||||
|
|||||||
Reference in New Issue
Block a user