From 29b6763290df05d42039806f3d142740568c80f0 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Fri, 27 Sep 2024 19:16:05 -0400 Subject: [PATCH] fix(debug): no more fullscreening when typing "F" in the flixel debugger console --- source/funkin/util/WindowUtil.hx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/funkin/util/WindowUtil.hx b/source/funkin/util/WindowUtil.hx index 3599e3ace..1d5739697 100644 --- a/source/funkin/util/WindowUtil.hx +++ b/source/funkin/util/WindowUtil.hx @@ -102,6 +102,15 @@ class WindowUtil openfl.Lib.current.stage.addEventListener(openfl.events.KeyboardEvent.KEY_DOWN, (e:openfl.events.KeyboardEvent) -> { for (key in PlayerSettings.player1.controls.getKeysForAction(WINDOW_FULLSCREEN)) { + // FlxG.stage.focus is set to null by the debug console stuff, + // so when that's in focus, we don't want to toggle fullscreen using F + // (annoying when tying "FlxG" in console... lol) + @:privateAccess + if (FlxG.game.debugger.visible) + { + return; + } + if (e.keyCode == key) { openfl.Lib.application.window.fullscreen = !openfl.Lib.application.window.fullscreen;