1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-15 03:13:45 +00:00

fix(debug): no more fullscreening when typing "F" in the flixel debugger console

This commit is contained in:
Cameron Taylor 2024-09-27 19:16:05 -04:00
parent 410cfe972d
commit 29b6763290

View file

@ -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;