Fix check for top screen. Fixes a problem with input focus after game reset.

Reported by Flide, thanks!

However, there's some underlying bug in screen focus tracking, this just works around it by checking for top screen in a more reliable way.
This commit is contained in:
Henrik Rydgård committed 2026-03-01 17:47:46 +01:00
1 parent 6066017019
commit e80c67df25
6 files changed
+12 -12

No files matched your search

+4
View File
@@ -264,6 +264,10 @@ void UIDialogScreen::sendMessage(UIMessage message, const char *value) {
}
}
bool UIScreen::IsOnTop() const {
return screenManager()->topScreen() == this;
}
void UIScreen::OnBack(UI::EventParams &e) {
TriggerFinish(DR_BACK);
}