Keep track of focus position

This commit is contained in:
iota97 2021-09-09 16:31:14 +02:00
parent f9f893f3fc
commit ecab31ef8b
4 changed files with 33 additions and 15 deletions

View file

@ -191,6 +191,13 @@ void ScreenManager::render() {
processFinishDialog();
}
void ScreenManager::getFocusPosition(float &x, float &y, float &z) {
UI::View *v = UI::GetFocusedView();
x = v ? v->GetBounds().x : 0;
y = v ? v->GetBounds().y : 0;
z = stack_.size();
}
void ScreenManager::sendMessage(const char *msg, const char *value) {
if (!strcmp(msg, "recreateviews"))
RecreateAllViews();