force focus to text input dialogs

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2023-06-27 20:30:31 +02:00
parent 46951f73d8
commit aac3edc1e2
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0

View file

@ -220,6 +220,10 @@ struct AsyncTextInput : OpaqueWidget
}
TextField::onSelectKey(e);
}
void step() override {
APP->event->setSelectedWidget(this);
TextField::step();
}
};
AsyncTextField* const textField = new AsyncTextField;
textField->box.size.x = contentLayout->box.size.x - (label != nullptr ? label->box.size.x + margin : 0);