haxe ui focus check

This commit is contained in:
lemz1
2025-09-06 15:40:00 +08:00
committed by Hundrec
parent 66554ec4b6
commit 4ebd00bc06
+5
View File
@@ -117,6 +117,11 @@ class WindowUtil
#if (desktop || html5)
openfl.Lib.current.stage.addEventListener(openfl.events.KeyboardEvent.KEY_DOWN, (e:openfl.events.KeyboardEvent) -> {
if (haxe.ui.focus.FocusManager.instance.focus != null)
{
return;
}
for (key in PlayerSettings.player1.controls.getKeysForAction(WINDOW_FULLSCREEN))
{
// FlxG.stage.focus is set to null by the debug console stuff,