From 5c07c41e6248fc2971accf3c199e30c9c24654bd Mon Sep 17 00:00:00 2001 From: MAJigsaw77 <77043862+MAJigsaw77@users.noreply.github.com> Date: Wed, 8 Oct 2025 00:25:56 +0300 Subject: [PATCH] Dont add `haxeui` if the platform doesnt use it. Co-Authored-By: sector-a <82838084+sector-a@users.noreply.github.com> --- project.hxp | 127 +++++++++++++++--- source/Main.hx | 13 +- source/funkin/InitState.hx | 8 ++ source/funkin/input/Cursor.hx | 4 + source/funkin/play/PlayState.hx | 4 + .../play/notes/notekind/NoteKindManager.hx | 2 + source/funkin/ui/debug/DebugMenuSubState.hx | 10 ++ .../ui/debug/anim/DebugBoundingState.hx | 2 + .../ui/debug/charting/ChartEditorState.hx | 4 +- .../charting/commands/AddEventsCommand.hx | 2 + .../commands/AddNewTimeChangeCommand.hx | 2 + .../charting/commands/AddNotesCommand.hx | 2 + .../charting/commands/ChartEditorCommand.hx | 2 + .../charting/commands/CopyItemsCommand.hx | 2 + .../charting/commands/CutItemsCommand.hx | 2 + .../commands/DeselectAllItemsCommand.hx | 2 + .../charting/commands/DeselectItemsCommand.hx | 2 + .../commands/ExtendNoteLengthCommand.hx | 2 + .../charting/commands/FlipNotesCommand.hx | 2 + .../commands/InvertSelectedItemsCommand.hx | 2 + .../commands/ModifyTimeChangeCommand.hx | 2 + .../charting/commands/MoveEventsCommand.hx | 2 + .../charting/commands/MoveItemsCommand.hx | 2 + .../charting/commands/MoveNotesCommand.hx | 2 + .../charting/commands/PasteItemsCommand.hx | 2 + .../charting/commands/RemoveEventsCommand.hx | 2 + .../charting/commands/RemoveItemsCommand.hx | 2 + .../charting/commands/RemoveNotesCommand.hx | 2 + .../commands/RemoveStackedNotesCommand.hx | 2 + .../commands/RemoveTimeChangeCommand.hx | 4 +- .../commands/SelectAllItemsCommand.hx | 2 + .../charting/commands/SelectItemsCommand.hx | 2 + .../commands/SetAudioOffsetCommand.hx | 2 + .../commands/SetFreeplayPreviewCommand.hx | 2 + .../commands/SetItemSelectionCommand.hx | 2 + .../commands/SwitchDifficultyCommand.hx | 2 + .../components/ChartEditorEventSprite.hx | 2 + .../components/ChartEditorHoldNoteSprite.hx | 2 + .../components/ChartEditorMeasureTicks.hx | 2 + .../components/ChartEditorNotePreview.hx | 2 + .../components/ChartEditorNoteSprite.hx | 2 + .../components/ChartEditorPlaybarHead.hx | 2 + .../ChartEditorSelectionSquareSprite.hx | 2 + .../ChartEditorBaseContextMenu.hx | 2 + .../ChartEditorDefaultContextMenu.hx | 2 + .../ChartEditorEventContextMenu.hx | 2 + .../ChartEditorHoldNoteContextMenu.hx | 2 + .../ChartEditorNoteContextMenu.hx | 2 + .../ChartEditorSelectionContextMenu.hx | 2 + .../dialogs/ChartEditorAboutDialog.hx | 2 + .../charting/dialogs/ChartEditorBaseDialog.hx | 2 + .../charting/dialogs/ChartEditorBaseMenu.hx | 2 + .../ChartEditorCharacterIconSelectorMenu.hx | 2 + .../dialogs/ChartEditorUploadChartDialog.hx | 2 + .../dialogs/ChartEditorUploadVocalsDialog.hx | 2 + .../dialogs/ChartEditorWelcomeDialog.hx | 2 + .../handlers/ChartEditorAudioHandler.hx | 2 + .../handlers/ChartEditorContextMenuHandler.hx | 3 +- .../handlers/ChartEditorDialogHandler.hx | 2 + .../handlers/ChartEditorGamepadHandler.hx | 2 + .../ChartEditorImportExportHandler.hx | 2 + .../ChartEditorNotificationHandler.hx | 2 + .../handlers/ChartEditorShortcutHandler.hx | 2 + .../handlers/ChartEditorThemeHandler.hx | 2 + .../handlers/ChartEditorToolboxHandler.hx | 2 + .../toolboxes/ChartEditorBaseToolbox.hx | 2 + .../toolboxes/ChartEditorDifficultyToolbox.hx | 2 + .../toolboxes/ChartEditorEventDataToolbox.hx | 2 + .../toolboxes/ChartEditorFreeplayToolbox.hx | 2 + .../toolboxes/ChartEditorMetadataToolbox.hx | 2 + .../toolboxes/ChartEditorNoteDataToolbox.hx | 2 + .../toolboxes/ChartEditorOffsetsToolbox.hx | 2 + .../charting/util/ChartEditorDropdowns.hx | 3 + source/funkin/ui/debug/stage/CharStage.hx | 2 + source/funkin/ui/debug/stage/SprStage.hx | 2 + .../ui/debug/stage/StageBuilderState.hx | 2 + .../ui/debug/stage/StageEditorCommand.hx | 2 + .../ui/debug/stage/StageOffsetSubState.hx | 2 + source/funkin/ui/debug/stage/StagetoolBar.hx | 2 + .../ui/debug/stageeditor/StageEditorObject.hx | 2 + .../ui/debug/stageeditor/StageEditorState.hx | 2 + .../stageeditor/components/AboutDialog.hx | 2 + .../components/BackupAvailableDialog.hx | 2 + .../components/ExitConfirmDialog.hx | 2 + .../stageeditor/components/FindObjDialog.hx | 2 + .../components/LoadFromUrlDialog.hx | 2 + .../stageeditor/components/NewObjDialog.hx | 2 + .../stageeditor/components/UserGuideDialog.hx | 2 + .../stageeditor/components/WelcomeDialog.hx | 2 + .../stageeditor/handlers/AssetDataHandler.hx | 2 + .../stageeditor/handlers/StageDataHandler.hx | 2 + .../stageeditor/handlers/UndoRedoHandler.hx | 2 + .../toolboxes/StageEditorCharacterToolbox.hx | 2 + .../toolboxes/StageEditorDefaultToolbox.hx | 2 + .../StageEditorObjectAnimsToolbox.hx | 2 + .../StageEditorObjectGraphicToolbox.hx | 2 + .../StageEditorObjectPropertiesToolbox.hx | 2 + .../toolboxes/StageEditorStageToolbox.hx | 2 + source/funkin/ui/haxeui/HaxeUISubState.hx | 2 + source/funkin/util/FileUtil.hx | 8 ++ source/funkin/util/HaxeUIUtil.hx | 2 + source/funkin/util/WindowUtil.hx | 2 + source/funkin/util/plugins/VolumePlugin.hx | 2 +- 103 files changed, 347 insertions(+), 25 deletions(-) diff --git a/project.hxp b/project.hxp index 5bef28a7b..48faf26b2 100644 --- a/project.hxp +++ b/project.hxp @@ -433,6 +433,13 @@ class Project extends HXProject */ static final FEATURE_SCREENSHOTS:FeatureFlag = "FEATURE_SCREENSHOTS"; + /** + * `-DFEATURE_HAXEUI` + * If this flag is enabled, the game will enable the HaxeUI interface layer. + * This can be used to provide menus, dialogs, and other UI components via HaxeUI. + */ + static final FEATURE_HAXEUI:FeatureFlag = "FEATURE_HAXEUI"; + /** * `-FEATURE_DEBUG_MENU` * If this flag is enabled, a debug menu will be accessible. @@ -846,10 +853,11 @@ class Project extends HXProject // Should be true except on web and mobile builds. // Debug editors aren't built to work on web or mobile right now. - FEATURE_DEBUG_MENU.apply(this, !(isWeb() || isMobile())); - FEATURE_ANIMATION_EDITOR.apply(this, !(isWeb() || isMobile())); - FEATURE_CHART_EDITOR.apply(this, !(isWeb() || isMobile())); - FEATURE_STAGE_EDITOR.apply(this, !(isWeb() || isMobile())); + FEATURE_HAXEUI.apply(this, !(isWeb() || isMobile())); + FEATURE_DEBUG_MENU.apply(this, FEATURE_HAXEUI.isEnabled(this)); + FEATURE_ANIMATION_EDITOR.apply(this, FEATURE_HAXEUI.isEnabled(this)); + FEATURE_CHART_EDITOR.apply(this, FEATURE_HAXEUI.isEnabled(this)); + FEATURE_STAGE_EDITOR.apply(this, FEATURE_HAXEUI.isEnabled(this)); // Should be true except on web builds (some asset stuff breaks it) FEATURE_LAG_ADJUSTMENT.apply(this, !isWeb()); @@ -1024,21 +1032,42 @@ class Project extends HXProject // Forcibly include all Funkin' classes in builds. // This prevents classes that are unused by the base game from being unavailable to HScript. - addHaxeMacro("include('funkin', true, ['funkin.mobile.*'])"); + addHaxeMacro("include('funkin', true, ['funkin.mobile.*', 'funkin.ui.debug.anim.*', 'funkin.ui.debug.charting.*', 'funkin.ui.debug.stage.*', 'funkin.ui.debug.stageeditor.*', 'funkin.ui.haxeui.*'])"); if (isMobile()) { addHaxeMacro("include('funkin.mobile')"); } - // Ensure all HaxeUI components are available at runtime. - addHaxeMacro("include('haxe.ui.backend.flixel.components')"); - addHaxeMacro("include('haxe.ui.core')"); - addHaxeMacro("include('haxe.ui.components')"); - addHaxeMacro("include('haxe.ui.containers')"); - addHaxeMacro("include('haxe.ui.containers.dialogs')"); - addHaxeMacro("include('haxe.ui.containers.menus')"); - addHaxeMacro("include('haxe.ui.containers.properties')"); + if (FEATURE_HAXEUI.isEnabled(this)) + { + if (FEATURE_ANIMATION_EDITOR.isEnabled(this)) + { + addHaxeMacro("include('funkin.ui.debug.anim')"); + } + + if (FEATURE_CHART_EDITOR.isEnabled(this)) + { + addHaxeMacro("include('funkin.ui.debug.charting')"); + } + + if (FEATURE_STAGE_EDITOR.isEnabled(this)) + { + addHaxeMacro("include('funkin.ui.debug.stage')"); + addHaxeMacro("include('funkin.ui.debug.stageeditor')"); + } + + addHaxeMacro("include('funkin.ui.haxeui')"); + + // Ensure all HaxeUI components are available at runtime. + addHaxeMacro("include('haxe.ui.backend.flixel.components')"); + addHaxeMacro("include('haxe.ui.core')"); + addHaxeMacro("include('haxe.ui.components')"); + addHaxeMacro("include('haxe.ui.containers')"); + addHaxeMacro("include('haxe.ui.containers.dialogs')"); + addHaxeMacro("include('haxe.ui.containers.menus')"); + addHaxeMacro("include('haxe.ui.containers.properties')"); + } // Ensure all Flixel classes are available at runtime. // Explicitly ignore packages which require additional dependencies. @@ -1244,9 +1273,12 @@ class Project extends HXProject addHaxelib('flixel-addons'); // Additional utilities for Flixel addHaxelib('hscript'); // Scripting - // addHaxelib('flixel-ui'); // UI framework (DEPRECATED) - addHaxelib('haxeui-core'); // UI framework - addHaxelib('haxeui-flixel'); // Integrate HaxeUI with Flixel + + if (FEATURE_HAXEUI.isEnabled(this)) + { + addHaxelib('haxeui-core'); // UI framework + addHaxelib('haxeui-flixel'); // Integrate HaxeUI with Flixel + } addHaxelib('polymod'); // Modding framework addHaxelib('flxanimate'); // Texture atlas rendering @@ -1353,6 +1385,15 @@ class Project extends HXProject addAssetLibrary("default", shouldEmbed, shouldPreloadDefault); addAssetPath("assets/preload", "assets", "default", ["*"], exclude, shouldEmbed, "assets"); + if (!FEATURE_ANIMATION_EDITOR.isEnabled(this)) + removeAssetPath('assets/preload/data/ui/animation-editor', "default"); + + if (!FEATURE_ANIMATION_EDITOR.isEnabled(this)) + removeAssetPath('assets/preload/data/ui/chart-editor', "default"); + + if (!FEATURE_ANIMATION_EDITOR.isEnabled(this)) + removeAssetPath('assets/preload/data/ui/stage-editor', "default"); + // Font assets var shouldEmbedFonts = true; addAssetPath("assets/fonts", null, "default", ["*"], exclude, shouldEmbedFonts, "assets"); @@ -1776,6 +1817,25 @@ class Project extends HXProject this.assets.push(asset); } + /** + * Remove an asset from the game build. + * @param path The path the asset is located at. + */ + public function removeAsset(path:String, ?library:String):Void + { + for (asset in this.assets) + { + if (asset.sourcePath == path) + { + if (library != null && asset.library != library) continue; + + this.assets.remove(asset); + // info("Removed asset: " + path); + break; + } + } + } + /** * Add an entire path of assets to the game build. * @param path The path the assets are located at. @@ -1833,6 +1893,41 @@ class Project extends HXProject } } + /** + * Remove all assets in a path recursively from the game build. + * @param path The path the assets are located at. + * @param library (optional) The asset library to remove the assets from. Defaults to all libraries. + */ + public function removeAssetPath(path:String, ?library:String):Void { + // Argument parsing. + if (path == "") + return; + + // Validate path. + if (!sys.FileSystem.exists(path)) { + error('Could not find asset path "${path}".'); + } else if (!sys.FileSystem.isDirectory(path)) { + error('Could not parse asset path "${path}", expected a directory.'); + } else { + // info(' Found asset path "${path}".'); + } + + for (exclude in EXCLUDE_ASSETS) + { + // Surely Eric got a better way to solve this. + if (path.contains(exclude.replace('*', ''))) return; + } + + for (file in sys.FileSystem.readDirectory(path)) { + if (sys.FileSystem.isDirectory('${path}/${file}')) { + // Attempt to recursively remove all assets in the directory. + removeAssetPath('${path}/${file}', library); + } else { + removeAsset('${path}/${file}', library); + } + } + } + /** * Add an asset library to the game build. * @param name The name of the library. diff --git a/source/Main.hx b/source/Main.hx index 37b3446a9..39f5f02d7 100644 --- a/source/Main.hx +++ b/source/Main.hx @@ -11,7 +11,6 @@ import funkin.util.logging.CrashHandler; import funkin.ui.debug.FunkinDebugDisplay; import funkin.ui.debug.FunkinDebugDisplay.DebugDisplayMode; import funkin.save.Save; -import haxe.ui.Toolkit; #if hxvlc import hxvlc.util.Handle; #end @@ -111,7 +110,9 @@ class Main extends Sprite function setupGame():Void { + #if FEATURE_HAXEUI initHaxeUI(); + #end // addChild gets called by the user settings code. debugDisplay = new FunkinDebugDisplay(10, 10, 0xFFFFFF); @@ -182,6 +183,7 @@ class Main extends Sprite #end } + #if FEATURE_HAXEUI function initHaxeUI():Void { // This has to come before Toolkit.init since locales get initialized there @@ -189,15 +191,16 @@ class Main extends Sprite // Calling this before any HaxeUI components get used is important: // - It initializes the theme styles. // - It scans the class path and registers any HaxeUI components. - Toolkit.init(); - Toolkit.theme = 'dark'; // don't be cringe - // Toolkit.theme = 'light'; // embrace cringe - Toolkit.autoScale = false; + haxe.ui.Toolkit.init(); + haxe.ui.Toolkit.theme = 'dark'; // don't be cringe + // haxe.ui.Toolkit.theme = 'light'; // embrace cringe + haxe.ui.Toolkit.autoScale = false; // Don't focus on UI elements when they first appear. haxe.ui.focus.FocusManager.instance.autoFocus = false; funkin.input.Cursor.registerHaxeUICursors(); haxe.ui.tooltips.ToolTipManager.defaultDelay = 200; } + #end function handleDebugDisplayKeys():Void { diff --git a/source/funkin/InitState.hx b/source/funkin/InitState.hx index db6388c05..b74316753 100644 --- a/source/funkin/InitState.hx +++ b/source/funkin/InitState.hx @@ -380,17 +380,25 @@ class InitState extends FlxState if (params.chart.shouldLoadChart) { + #if FEATURE_CHART_EDITOR FlxG.switchState(() -> new ChartEditorState( { fnfcTargetPath: params.chart.chartPath, })); + #else + FlxG.switchState(() -> new TitleState()); + #end } else if (params.stage.shouldLoadStage) { + #if FEATURE_STAGE_EDITOR FlxG.switchState(() -> new StageEditorState( { fnfsTargetPath: params.stage.stagePath, })); + #else + FlxG.switchState(() -> new TitleState()); + #end } else if (params.song.shouldLoadSong && params.song.songPath != null) { diff --git a/source/funkin/input/Cursor.hx b/source/funkin/input/Cursor.hx index 554a6b2c1..3998e9843 100644 --- a/source/funkin/input/Cursor.hx +++ b/source/funkin/input/Cursor.hx @@ -1,6 +1,8 @@ package funkin.input; +#if FEATURE_HAXEUI import haxe.ui.backend.flixel.CursorHelper; +#end import lime.app.Future; import openfl.display.BitmapData; @@ -542,6 +544,7 @@ class Cursor trace("Failed to load cursor graphic for cursor mode " + cursorMode + ": " + error); } + #if FEATURE_HAXEUI public static function registerHaxeUICursors():Void { CursorHelper.useCustomCursors = true; @@ -564,6 +567,7 @@ class Cursor { CursorHelper.registerCursor(id, params.graphic, params.scale, params.offsetX, params.offsetY); } + #end } // https://developer.mozilla.org/en-US/docs/Web/CSS/cursor diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index 7d8069218..baca78a95 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -382,7 +382,11 @@ class PlayState extends MusicBeatSubState function get_isChartingMode():Bool { + #if FEATURE_CHART_EDITOR return this._parentState != null && Std.isOfType(this._parentState, ChartEditorState); + #else + return false; + #end } /** diff --git a/source/funkin/play/notes/notekind/NoteKindManager.hx b/source/funkin/play/notes/notekind/NoteKindManager.hx index deb7248be..e99cb7df8 100644 --- a/source/funkin/play/notes/notekind/NoteKindManager.hx +++ b/source/funkin/play/notes/notekind/NoteKindManager.hx @@ -91,7 +91,9 @@ class NoteKindManager var script:NoteKind = ScriptedNoteKind.init(scriptedClass, "unknown"); trace(' Initialized scripted note kind: ${script.noteKind}'); noteKinds.set(script.noteKind, script); + #if FEATURE_CHART_EDITOR ChartEditorDropdowns.NOTE_KINDS.set(script.noteKind, script.description); + #end } catch (e) { diff --git a/source/funkin/ui/debug/DebugMenuSubState.hx b/source/funkin/ui/debug/DebugMenuSubState.hx index 3b06a4c58..419f40849 100644 --- a/source/funkin/ui/debug/DebugMenuSubState.hx +++ b/source/funkin/ui/debug/DebugMenuSubState.hx @@ -72,8 +72,10 @@ class DebugMenuSubState extends MusicBeatSubState onMenuChange(items.members[0]); FlxG.camera.focusOn(new FlxPoint(camFocusPoint.x, camFocusPoint.y + 500)); + #if FEATURE_HAXEUI // Remove the "user" stylesheet to prevent components using incorrect style data when entering an editor. haxe.ui.Toolkit.styleSheet.clear("user"); + #end } function onMenuChange(selected:TextMenuItem) @@ -100,23 +102,27 @@ class DebugMenuSubState extends MusicBeatSubState return item; } + #if FEATURE_CHART_EDITOR function openChartEditor():Void { FlxTransitionableState.skipNextTransIn = true; FlxG.switchState(() -> new ChartEditorState()); } + #end function openCharSelect():Void { FlxG.switchState(() -> new funkin.ui.charSelect.CharSelectSubState()); } + #if FEATURE_ANIMATION_EDITOR function openAnimationEditor():Void { FlxG.switchState(() -> new funkin.ui.debug.anim.DebugBoundingState()); trace('Animation Editor'); } + #end function testStickers():Void { @@ -124,16 +130,20 @@ class DebugMenuSubState extends MusicBeatSubState trace('opened stickers'); } + #if FEATURE_STAGE_EDITOR function openStageEditor():Void { trace('Stage Editor'); FlxG.switchState(() -> new funkin.ui.debug.stageeditor.StageEditorState()); } + #end + #if FEATURE_RESULTS_DEBUG function openTestResultsScreen():Void { FlxG.switchState(() -> new funkin.ui.debug.results.ResultsDebugSubState()); } + #end #if sys function openLogFolder() diff --git a/source/funkin/ui/debug/anim/DebugBoundingState.hx b/source/funkin/ui/debug/anim/DebugBoundingState.hx index f114d773e..1e7c869e8 100644 --- a/source/funkin/ui/debug/anim/DebugBoundingState.hx +++ b/source/funkin/ui/debug/anim/DebugBoundingState.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.anim; +#if FEATURE_ANIMATION_EDITOR import flixel.addons.display.FlxBackdrop; import flixel.addons.display.FlxGridOverlay; import flixel.FlxCamera; @@ -639,3 +640,4 @@ enum abstract ANIMDEBUGVIEW(String) var SPRITESHEET; var ANIMATIONS; } +#end diff --git a/source/funkin/ui/debug/charting/ChartEditorState.hx b/source/funkin/ui/debug/charting/ChartEditorState.hx index 200475119..6c1b4459c 100644 --- a/source/funkin/ui/debug/charting/ChartEditorState.hx +++ b/source/funkin/ui/debug/charting/ChartEditorState.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting; +#if FEATURE_CHART_EDITOR import flixel.addons.display.FlxSliceSprite; import flixel.addons.display.FlxTiledSprite; import flixel.addons.transition.FlxTransitionableState; @@ -6590,7 +6591,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState { displayAutosavePopup = false; #if sys - Toolkit.callLater(() -> { + haxe.ui.Toolkit.callLater(() -> { var absoluteBackupsPath:String = Path.join([Sys.getCwd(), ChartEditorImportExportHandler.BACKUPS_PATH]); this.infoWithActions('Auto-Save', 'Chart auto-saved to ${absoluteBackupsPath}.', [ { @@ -7038,6 +7039,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState return params; } } +#end /** * Available input modes for the chart editor state. Numbers/arrows/WASD available for other keybinds. diff --git a/source/funkin/ui/debug/charting/commands/AddEventsCommand.hx b/source/funkin/ui/debug/charting/commands/AddEventsCommand.hx index a878ee687..0debfcfad 100644 --- a/source/funkin/ui/debug/charting/commands/AddEventsCommand.hx +++ b/source/funkin/ui/debug/charting/commands/AddEventsCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongEventData; import funkin.data.song.SongDataUtils; @@ -71,3 +72,4 @@ class AddEventsCommand implements ChartEditorCommand return 'Add $len Events'; } } +#end diff --git a/source/funkin/ui/debug/charting/commands/AddNewTimeChangeCommand.hx b/source/funkin/ui/debug/charting/commands/AddNewTimeChangeCommand.hx index bfbf10b63..e8bb45841 100644 --- a/source/funkin/ui/debug/charting/commands/AddNewTimeChangeCommand.hx +++ b/source/funkin/ui/debug/charting/commands/AddNewTimeChangeCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongTimeChange; import funkin.ui.debug.charting.toolboxes.ChartEditorMetadataToolbox; @@ -93,3 +94,4 @@ class AddNewTimeChangeCommand implements ChartEditorCommand return 'Added new TimeChange ${timeChangeIndex + 1} at ${targetTimeStamp}'; } } +#end diff --git a/source/funkin/ui/debug/charting/commands/AddNotesCommand.hx b/source/funkin/ui/debug/charting/commands/AddNotesCommand.hx index ea984c82d..c5d39f7f9 100644 --- a/source/funkin/ui/debug/charting/commands/AddNotesCommand.hx +++ b/source/funkin/ui/debug/charting/commands/AddNotesCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongNoteData; import funkin.data.song.SongDataUtils; @@ -76,3 +77,4 @@ class AddNotesCommand implements ChartEditorCommand return 'Add ${notes.length} Notes'; } } +#end diff --git a/source/funkin/ui/debug/charting/commands/ChartEditorCommand.hx b/source/funkin/ui/debug/charting/commands/ChartEditorCommand.hx index 1fa86ad94..5167efc96 100644 --- a/source/funkin/ui/debug/charting/commands/ChartEditorCommand.hx +++ b/source/funkin/ui/debug/charting/commands/ChartEditorCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR /** * Actions in the chart editor are backed by the Command pattern * (see Bob Nystrom's book "Game Programming Patterns" for more info) @@ -39,3 +40,4 @@ interface ChartEditorCommand */ public function toString():String; } +#end diff --git a/source/funkin/ui/debug/charting/commands/CopyItemsCommand.hx b/source/funkin/ui/debug/charting/commands/CopyItemsCommand.hx index 9ccfac37d..b51835248 100644 --- a/source/funkin/ui/debug/charting/commands/CopyItemsCommand.hx +++ b/source/funkin/ui/debug/charting/commands/CopyItemsCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongNoteData; import funkin.data.song.SongData.SongEventData; import funkin.data.song.SongDataUtils; @@ -170,3 +171,4 @@ class CopyItemsCommand implements ChartEditorCommand return 'Copy $len Items to Clipboard'; } } +#end diff --git a/source/funkin/ui/debug/charting/commands/CutItemsCommand.hx b/source/funkin/ui/debug/charting/commands/CutItemsCommand.hx index 6cf674f80..94401afac 100644 --- a/source/funkin/ui/debug/charting/commands/CutItemsCommand.hx +++ b/source/funkin/ui/debug/charting/commands/CutItemsCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongNoteData; import funkin.data.song.SongData.SongEventData; import funkin.data.song.SongDataUtils; @@ -72,3 +73,4 @@ class CutItemsCommand implements ChartEditorCommand return 'Cut $len Items to Clipboard'; } } +#end diff --git a/source/funkin/ui/debug/charting/commands/DeselectAllItemsCommand.hx b/source/funkin/ui/debug/charting/commands/DeselectAllItemsCommand.hx index 5bfef76cc..4356bc34d 100644 --- a/source/funkin/ui/debug/charting/commands/DeselectAllItemsCommand.hx +++ b/source/funkin/ui/debug/charting/commands/DeselectAllItemsCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongNoteData; import funkin.data.song.SongData.SongEventData; @@ -45,3 +46,4 @@ class DeselectAllItemsCommand implements ChartEditorCommand return 'Deselect All Items'; } } +#end diff --git a/source/funkin/ui/debug/charting/commands/DeselectItemsCommand.hx b/source/funkin/ui/debug/charting/commands/DeselectItemsCommand.hx index 6a115a26a..8b1401d07 100644 --- a/source/funkin/ui/debug/charting/commands/DeselectItemsCommand.hx +++ b/source/funkin/ui/debug/charting/commands/DeselectItemsCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongNoteData; import funkin.data.song.SongData.SongEventData; import funkin.data.song.SongDataUtils; @@ -69,3 +70,4 @@ class DeselectItemsCommand implements ChartEditorCommand return 'Deselect ${notes.length + events.length} Items'; } } +#end diff --git a/source/funkin/ui/debug/charting/commands/ExtendNoteLengthCommand.hx b/source/funkin/ui/debug/charting/commands/ExtendNoteLengthCommand.hx index 3ef9f22d1..0efc987fe 100644 --- a/source/funkin/ui/debug/charting/commands/ExtendNoteLengthCommand.hx +++ b/source/funkin/ui/debug/charting/commands/ExtendNoteLengthCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongNoteData; /** @@ -82,3 +83,4 @@ enum Unit MILLISECONDS; STEPS; } +#end diff --git a/source/funkin/ui/debug/charting/commands/FlipNotesCommand.hx b/source/funkin/ui/debug/charting/commands/FlipNotesCommand.hx index f54ffed15..48815b4a9 100644 --- a/source/funkin/ui/debug/charting/commands/FlipNotesCommand.hx +++ b/source/funkin/ui/debug/charting/commands/FlipNotesCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongNoteData; import funkin.data.song.SongDataUtils; @@ -63,3 +64,4 @@ class FlipNotesCommand implements ChartEditorCommand return 'Flip $len Notes'; } } +#end diff --git a/source/funkin/ui/debug/charting/commands/InvertSelectedItemsCommand.hx b/source/funkin/ui/debug/charting/commands/InvertSelectedItemsCommand.hx index d9a28f463..cf3461241 100644 --- a/source/funkin/ui/debug/charting/commands/InvertSelectedItemsCommand.hx +++ b/source/funkin/ui/debug/charting/commands/InvertSelectedItemsCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongNoteData; import funkin.data.song.SongData.SongEventData; import funkin.data.song.SongDataUtils; @@ -47,3 +48,4 @@ class InvertSelectedItemsCommand implements ChartEditorCommand return 'Invert Selected Items'; } } +#end diff --git a/source/funkin/ui/debug/charting/commands/ModifyTimeChangeCommand.hx b/source/funkin/ui/debug/charting/commands/ModifyTimeChangeCommand.hx index 9ab442bb9..7803cde78 100644 --- a/source/funkin/ui/debug/charting/commands/ModifyTimeChangeCommand.hx +++ b/source/funkin/ui/debug/charting/commands/ModifyTimeChangeCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongTimeChange; import funkin.ui.debug.charting.toolboxes.ChartEditorMetadataToolbox; @@ -123,3 +124,4 @@ class ModifyTimeChangeCommand implements ChartEditorCommand return 'TimeChange ${timeChangeIndex}: ${targetTimeStamp} ms : BPM: ${targetBPM} in ${targetNumerator}/${targetDenominator}'; } } +#end diff --git a/source/funkin/ui/debug/charting/commands/MoveEventsCommand.hx b/source/funkin/ui/debug/charting/commands/MoveEventsCommand.hx index ed50ad33e..3e70df266 100644 --- a/source/funkin/ui/debug/charting/commands/MoveEventsCommand.hx +++ b/source/funkin/ui/debug/charting/commands/MoveEventsCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongEventData; import funkin.data.song.SongData.SongNoteData; import funkin.data.song.SongDataUtils; @@ -77,3 +78,4 @@ class MoveEventsCommand implements ChartEditorCommand return 'Move $len Events'; } } +#end diff --git a/source/funkin/ui/debug/charting/commands/MoveItemsCommand.hx b/source/funkin/ui/debug/charting/commands/MoveItemsCommand.hx index f44cb973a..0d24810b8 100644 --- a/source/funkin/ui/debug/charting/commands/MoveItemsCommand.hx +++ b/source/funkin/ui/debug/charting/commands/MoveItemsCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongEventData; import funkin.data.song.SongData.SongNoteData; import funkin.data.song.SongDataUtils; @@ -100,3 +101,4 @@ class MoveItemsCommand implements ChartEditorCommand return 'Move $len Items'; } } +#end diff --git a/source/funkin/ui/debug/charting/commands/MoveNotesCommand.hx b/source/funkin/ui/debug/charting/commands/MoveNotesCommand.hx index 51aeb5bbc..0d0d39a74 100644 --- a/source/funkin/ui/debug/charting/commands/MoveNotesCommand.hx +++ b/source/funkin/ui/debug/charting/commands/MoveNotesCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongNoteData; import funkin.data.song.SongDataUtils; @@ -79,3 +80,4 @@ class MoveNotesCommand implements ChartEditorCommand return 'Move $len Notes'; } } +#end diff --git a/source/funkin/ui/debug/charting/commands/PasteItemsCommand.hx b/source/funkin/ui/debug/charting/commands/PasteItemsCommand.hx index 528704f82..1bda21f1c 100644 --- a/source/funkin/ui/debug/charting/commands/PasteItemsCommand.hx +++ b/source/funkin/ui/debug/charting/commands/PasteItemsCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongEventData; import funkin.data.song.SongData.SongNoteData; import funkin.data.song.SongDataUtils; @@ -116,3 +117,4 @@ class PasteItemsCommand implements ChartEditorCommand return 'Paste $len Items'; } } +#end diff --git a/source/funkin/ui/debug/charting/commands/RemoveEventsCommand.hx b/source/funkin/ui/debug/charting/commands/RemoveEventsCommand.hx index 30f4280d2..2cefc7698 100644 --- a/source/funkin/ui/debug/charting/commands/RemoveEventsCommand.hx +++ b/source/funkin/ui/debug/charting/commands/RemoveEventsCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongEventData; import funkin.data.song.SongDataUtils; @@ -68,3 +69,4 @@ class RemoveEventsCommand implements ChartEditorCommand return 'Remove ${events.length} Events'; } } +#end diff --git a/source/funkin/ui/debug/charting/commands/RemoveItemsCommand.hx b/source/funkin/ui/debug/charting/commands/RemoveItemsCommand.hx index 1cc61f233..c6939b1ad 100644 --- a/source/funkin/ui/debug/charting/commands/RemoveItemsCommand.hx +++ b/source/funkin/ui/debug/charting/commands/RemoveItemsCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongNoteData; import funkin.data.song.SongData.SongEventData; import funkin.data.song.SongDataUtils; @@ -77,3 +78,4 @@ class RemoveItemsCommand implements ChartEditorCommand return 'Remove ${notes.length + events.length} Items'; } } +#end diff --git a/source/funkin/ui/debug/charting/commands/RemoveNotesCommand.hx b/source/funkin/ui/debug/charting/commands/RemoveNotesCommand.hx index 18ad6e04d..aadeeaac7 100644 --- a/source/funkin/ui/debug/charting/commands/RemoveNotesCommand.hx +++ b/source/funkin/ui/debug/charting/commands/RemoveNotesCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongNoteData; import funkin.data.song.SongDataUtils; @@ -71,3 +72,4 @@ class RemoveNotesCommand implements ChartEditorCommand return 'Remove ${notes.length} Notes'; } } +#end diff --git a/source/funkin/ui/debug/charting/commands/RemoveStackedNotesCommand.hx b/source/funkin/ui/debug/charting/commands/RemoveStackedNotesCommand.hx index 8add3026b..5c72df4c3 100644 --- a/source/funkin/ui/debug/charting/commands/RemoveStackedNotesCommand.hx +++ b/source/funkin/ui/debug/charting/commands/RemoveStackedNotesCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongNoteData; import funkin.data.song.SongDataUtils; import funkin.data.song.SongNoteDataUtils; @@ -80,3 +81,4 @@ class RemoveStackedNotesCommand implements ChartEditorCommand return 'Remove ${removedNotes.length} Stacked Notes'; } } +#end diff --git a/source/funkin/ui/debug/charting/commands/RemoveTimeChangeCommand.hx b/source/funkin/ui/debug/charting/commands/RemoveTimeChangeCommand.hx index 44c85100d..a9c5f2a07 100644 --- a/source/funkin/ui/debug/charting/commands/RemoveTimeChangeCommand.hx +++ b/source/funkin/ui/debug/charting/commands/RemoveTimeChangeCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongTimeChange; import funkin.ui.debug.charting.toolboxes.ChartEditorMetadataToolbox; @@ -83,8 +84,9 @@ class RemoveTimeChangeCommand implements ChartEditorCommand public function toString():String { if (removedTimeChange != null && removedTimeChange.length > 0) return - 'TimeChange ${timeChangeIndex} : ${removedTimeChange[0].timeStamp} ms : BPM: ${removedTimeChange[0].bpm} in ${removedTimeChange[0].timeSignatureNum}/${removedTimeChange[0].timeSignatureDen} removed' + 'TimeChange ${timeChangeIndex} : ${removedTimeChange[0].timeStamp} ms : BPM: ${removedTimeChange[0].bpm} in ${removedTimeChange[0].timeSignatureNum}/${removedTimeChange[0].timeSignatureDen} removed' else return 'huh?'; } } +#end diff --git a/source/funkin/ui/debug/charting/commands/SelectAllItemsCommand.hx b/source/funkin/ui/debug/charting/commands/SelectAllItemsCommand.hx index f550e044b..b6e90db6f 100644 --- a/source/funkin/ui/debug/charting/commands/SelectAllItemsCommand.hx +++ b/source/funkin/ui/debug/charting/commands/SelectAllItemsCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongNoteData; import funkin.data.song.SongData.SongEventData; @@ -67,3 +68,4 @@ class SelectAllItemsCommand implements ChartEditorCommand } } } +#end diff --git a/source/funkin/ui/debug/charting/commands/SelectItemsCommand.hx b/source/funkin/ui/debug/charting/commands/SelectItemsCommand.hx index 423295f1a..34ffd912a 100644 --- a/source/funkin/ui/debug/charting/commands/SelectItemsCommand.hx +++ b/source/funkin/ui/debug/charting/commands/SelectItemsCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongNoteData; import funkin.data.song.SongData.SongEventData; import funkin.data.song.SongDataUtils; @@ -119,3 +120,4 @@ class SelectItemsCommand implements ChartEditorCommand return 'Select ${len} Items'; } } +#end diff --git a/source/funkin/ui/debug/charting/commands/SetAudioOffsetCommand.hx b/source/funkin/ui/debug/charting/commands/SetAudioOffsetCommand.hx index 606d544cc..ea2ecaffd 100644 --- a/source/funkin/ui/debug/charting/commands/SetAudioOffsetCommand.hx +++ b/source/funkin/ui/debug/charting/commands/SetAudioOffsetCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR /** * Command that copies a given set of notes and song events to the clipboard, * without deleting them from the chart editor. @@ -105,3 +106,4 @@ enum AudioOffsetType PLAYER; OPPONENT; } +#end diff --git a/source/funkin/ui/debug/charting/commands/SetFreeplayPreviewCommand.hx b/source/funkin/ui/debug/charting/commands/SetFreeplayPreviewCommand.hx index 232768904..615c36e07 100644 --- a/source/funkin/ui/debug/charting/commands/SetFreeplayPreviewCommand.hx +++ b/source/funkin/ui/debug/charting/commands/SetFreeplayPreviewCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongNoteData; import funkin.data.song.SongDataUtils; @@ -60,3 +61,4 @@ class SetFreeplayPreviewCommand implements ChartEditorCommand } } } +#end diff --git a/source/funkin/ui/debug/charting/commands/SetItemSelectionCommand.hx b/source/funkin/ui/debug/charting/commands/SetItemSelectionCommand.hx index 661c44d85..8d52b712d 100644 --- a/source/funkin/ui/debug/charting/commands/SetItemSelectionCommand.hx +++ b/source/funkin/ui/debug/charting/commands/SetItemSelectionCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongNoteData; import funkin.data.song.SongData.SongEventData; @@ -101,3 +102,4 @@ class SetItemSelectionCommand implements ChartEditorCommand return 'Select ${notes.length + events.length} Items'; } } +#end diff --git a/source/funkin/ui/debug/charting/commands/SwitchDifficultyCommand.hx b/source/funkin/ui/debug/charting/commands/SwitchDifficultyCommand.hx index 30c2edb61..87632b98c 100644 --- a/source/funkin/ui/debug/charting/commands/SwitchDifficultyCommand.hx +++ b/source/funkin/ui/debug/charting/commands/SwitchDifficultyCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.commands; +#if FEATURE_CHART_EDITOR /** * Switch the current difficulty (and possibly variation) of the chart in the chart editor. */ @@ -49,3 +50,4 @@ class SwitchDifficultyCommand implements ChartEditorCommand return 'Switch Difficulty'; } } +#end diff --git a/source/funkin/ui/debug/charting/components/ChartEditorEventSprite.hx b/source/funkin/ui/debug/charting/components/ChartEditorEventSprite.hx index dc7ad45d7..de596f44a 100644 --- a/source/funkin/ui/debug/charting/components/ChartEditorEventSprite.hx +++ b/source/funkin/ui/debug/charting/components/ChartEditorEventSprite.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.components; +#if FEATURE_CHART_EDITOR import funkin.data.event.SongEventRegistry; import flixel.graphics.frames.FlxAtlasFrames; import openfl.display.BitmapData; @@ -244,3 +245,4 @@ class ChartEditorEventSprite extends FlxSprite return !aboveViewArea && !belowViewArea; } } +#end diff --git a/source/funkin/ui/debug/charting/components/ChartEditorHoldNoteSprite.hx b/source/funkin/ui/debug/charting/components/ChartEditorHoldNoteSprite.hx index f747fe1e4..3c0390cfd 100644 --- a/source/funkin/ui/debug/charting/components/ChartEditorHoldNoteSprite.hx +++ b/source/funkin/ui/debug/charting/components/ChartEditorHoldNoteSprite.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.components; +#if FEATURE_CHART_EDITOR import funkin.play.notes.Strumline; import funkin.data.notestyle.NoteStyleRegistry; import funkin.play.notes.notestyle.NoteStyle; @@ -284,3 +285,4 @@ class ChartEditorHoldNoteSprite extends SustainTrail this.x += this.offset.x; } } +#end diff --git a/source/funkin/ui/debug/charting/components/ChartEditorMeasureTicks.hx b/source/funkin/ui/debug/charting/components/ChartEditorMeasureTicks.hx index e34824b50..041a504a9 100644 --- a/source/funkin/ui/debug/charting/components/ChartEditorMeasureTicks.hx +++ b/source/funkin/ui/debug/charting/components/ChartEditorMeasureTicks.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.components; +#if FEATURE_CHART_EDITOR import flixel.FlxSprite; import flixel.group.FlxSpriteGroup.FlxTypedSpriteGroup; import flixel.math.FlxRect; @@ -86,3 +87,4 @@ class ChartEditorMeasureTicks extends FlxTypedSpriteGroup } } } +#end diff --git a/source/funkin/ui/debug/charting/components/ChartEditorNotePreview.hx b/source/funkin/ui/debug/charting/components/ChartEditorNotePreview.hx index b2762b68c..32819ae2b 100644 --- a/source/funkin/ui/debug/charting/components/ChartEditorNotePreview.hx +++ b/source/funkin/ui/debug/charting/components/ChartEditorNotePreview.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.components; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongEventData; import funkin.data.song.SongData.SongNoteData; import flixel.math.FlxMath; @@ -210,3 +211,4 @@ enum NotePreviewType Selection; Overlapping; } +#end diff --git a/source/funkin/ui/debug/charting/components/ChartEditorNoteSprite.hx b/source/funkin/ui/debug/charting/components/ChartEditorNoteSprite.hx index de03dde59..c86f770cc 100644 --- a/source/funkin/ui/debug/charting/components/ChartEditorNoteSprite.hx +++ b/source/funkin/ui/debug/charting/components/ChartEditorNoteSprite.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.components; +#if FEATURE_CHART_EDITOR import flixel.text.FlxText; import flixel.util.FlxColor; import flixel.FlxObject; @@ -337,3 +338,4 @@ class ChartEditorNoteSprite extends FlxSprite return !aboveViewArea && !belowViewArea; } } +#end diff --git a/source/funkin/ui/debug/charting/components/ChartEditorPlaybarHead.hx b/source/funkin/ui/debug/charting/components/ChartEditorPlaybarHead.hx index 7e62912d9..b6fcc0224 100644 --- a/source/funkin/ui/debug/charting/components/ChartEditorPlaybarHead.hx +++ b/source/funkin/ui/debug/charting/components/ChartEditorPlaybarHead.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.components; +#if FEATURE_CHART_EDITOR import haxe.ui.containers.Box; /** @@ -14,3 +15,4 @@ class ChartEditorPlaybarHead extends Box // Auto-populated. // public function new() { } } +#end diff --git a/source/funkin/ui/debug/charting/components/ChartEditorSelectionSquareSprite.hx b/source/funkin/ui/debug/charting/components/ChartEditorSelectionSquareSprite.hx index eec96b450..17252b05c 100644 --- a/source/funkin/ui/debug/charting/components/ChartEditorSelectionSquareSprite.hx +++ b/source/funkin/ui/debug/charting/components/ChartEditorSelectionSquareSprite.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.components; +#if FEATURE_CHART_EDITOR import flixel.addons.display.FlxSliceSprite; import flixel.math.FlxRect; import funkin.data.song.SongData.SongEventData; @@ -30,3 +31,4 @@ class ChartEditorSelectionSquareSprite extends FlxSliceSprite 32, 32); } } +#end diff --git a/source/funkin/ui/debug/charting/contextmenus/ChartEditorBaseContextMenu.hx b/source/funkin/ui/debug/charting/contextmenus/ChartEditorBaseContextMenu.hx index f25f3ebb3..6f6ad553b 100644 --- a/source/funkin/ui/debug/charting/contextmenus/ChartEditorBaseContextMenu.hx +++ b/source/funkin/ui/debug/charting/contextmenus/ChartEditorBaseContextMenu.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.contextmenus; +#if FEATURE_CHART_EDITOR import haxe.ui.containers.menus.Menu; @:access(funkin.ui.debug.charting.ChartEditorState) @@ -17,3 +18,4 @@ class ChartEditorBaseContextMenu extends Menu this.top = yPos; } } +#end diff --git a/source/funkin/ui/debug/charting/contextmenus/ChartEditorDefaultContextMenu.hx b/source/funkin/ui/debug/charting/contextmenus/ChartEditorDefaultContextMenu.hx index d704114e8..eb38b0a69 100644 --- a/source/funkin/ui/debug/charting/contextmenus/ChartEditorDefaultContextMenu.hx +++ b/source/funkin/ui/debug/charting/contextmenus/ChartEditorDefaultContextMenu.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.contextmenus; +#if FEATURE_CHART_EDITOR @:access(funkin.ui.debug.charting.ChartEditorState) @:build(haxe.ui.ComponentBuilder.build("assets/exclude/data/ui/chart-editor/context-menus/default.xml")) class ChartEditorDefaultContextMenu extends ChartEditorBaseContextMenu @@ -9,3 +10,4 @@ class ChartEditorDefaultContextMenu extends ChartEditorBaseContextMenu super(chartEditorState2, xPos2, yPos2); } } +#end diff --git a/source/funkin/ui/debug/charting/contextmenus/ChartEditorEventContextMenu.hx b/source/funkin/ui/debug/charting/contextmenus/ChartEditorEventContextMenu.hx index 4e404e108..456c9ec74 100644 --- a/source/funkin/ui/debug/charting/contextmenus/ChartEditorEventContextMenu.hx +++ b/source/funkin/ui/debug/charting/contextmenus/ChartEditorEventContextMenu.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.contextmenus; +#if FEATURE_CHART_EDITOR import haxe.ui.containers.menus.MenuItem; import funkin.data.song.SongData.SongEventData; import funkin.ui.debug.charting.commands.RemoveEventsCommand; @@ -32,3 +33,4 @@ class ChartEditorEventContextMenu extends ChartEditorBaseContextMenu } } } +#end diff --git a/source/funkin/ui/debug/charting/contextmenus/ChartEditorHoldNoteContextMenu.hx b/source/funkin/ui/debug/charting/contextmenus/ChartEditorHoldNoteContextMenu.hx index 75c4d626a..5a08943b0 100644 --- a/source/funkin/ui/debug/charting/contextmenus/ChartEditorHoldNoteContextMenu.hx +++ b/source/funkin/ui/debug/charting/contextmenus/ChartEditorHoldNoteContextMenu.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.contextmenus; +#if FEATURE_CHART_EDITOR import haxe.ui.containers.menus.MenuItem; import funkin.data.song.SongData.SongNoteData; import funkin.ui.debug.charting.commands.FlipNotesCommand; @@ -39,3 +40,4 @@ class ChartEditorHoldNoteContextMenu extends ChartEditorBaseContextMenu } } } +#end diff --git a/source/funkin/ui/debug/charting/contextmenus/ChartEditorNoteContextMenu.hx b/source/funkin/ui/debug/charting/contextmenus/ChartEditorNoteContextMenu.hx index d3c44055a..79f7be52b 100644 --- a/source/funkin/ui/debug/charting/contextmenus/ChartEditorNoteContextMenu.hx +++ b/source/funkin/ui/debug/charting/contextmenus/ChartEditorNoteContextMenu.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.contextmenus; +#if FEATURE_CHART_EDITOR import haxe.ui.containers.menus.MenuItem; import funkin.data.song.SongData.SongNoteData; import funkin.ui.debug.charting.commands.FlipNotesCommand; @@ -39,3 +40,4 @@ class ChartEditorNoteContextMenu extends ChartEditorBaseContextMenu } } } +#end diff --git a/source/funkin/ui/debug/charting/contextmenus/ChartEditorSelectionContextMenu.hx b/source/funkin/ui/debug/charting/contextmenus/ChartEditorSelectionContextMenu.hx index 215150ad8..46e211c3d 100644 --- a/source/funkin/ui/debug/charting/contextmenus/ChartEditorSelectionContextMenu.hx +++ b/source/funkin/ui/debug/charting/contextmenus/ChartEditorSelectionContextMenu.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.contextmenus; +#if FEATURE_CHART_EDITOR import haxe.ui.containers.menus.MenuItem; import funkin.ui.debug.charting.commands.CutItemsCommand; import funkin.ui.debug.charting.commands.RemoveEventsCommand; @@ -72,3 +73,4 @@ class ChartEditorSelectionContextMenu extends ChartEditorBaseContextMenu } } } +#end diff --git a/source/funkin/ui/debug/charting/dialogs/ChartEditorAboutDialog.hx b/source/funkin/ui/debug/charting/dialogs/ChartEditorAboutDialog.hx index 8b55be540..3a0db490b 100644 --- a/source/funkin/ui/debug/charting/dialogs/ChartEditorAboutDialog.hx +++ b/source/funkin/ui/debug/charting/dialogs/ChartEditorAboutDialog.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.dialogs; +#if FEATURE_CHART_EDITOR import funkin.ui.debug.charting.dialogs.ChartEditorBaseDialog.DialogParams; @:build(haxe.ui.ComponentBuilder.build("assets/exclude/data/ui/chart-editor/dialogs/about.xml")) @@ -23,3 +24,4 @@ class ChartEditorAboutDialog extends ChartEditorBaseDialog return dialog; } } +#end diff --git a/source/funkin/ui/debug/charting/dialogs/ChartEditorBaseDialog.hx b/source/funkin/ui/debug/charting/dialogs/ChartEditorBaseDialog.hx index 7cac85df4..9f9eec3ee 100644 --- a/source/funkin/ui/debug/charting/dialogs/ChartEditorBaseDialog.hx +++ b/source/funkin/ui/debug/charting/dialogs/ChartEditorBaseDialog.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.dialogs; +#if FEATURE_CHART_EDITOR import haxe.ui.containers.dialogs.Dialog; import haxe.ui.containers.dialogs.Dialog.DialogEvent; import haxe.ui.animation.AnimationBuilder; @@ -112,3 +113,4 @@ typedef DialogDropTarget = component:Component, handler:String->Void } +#end diff --git a/source/funkin/ui/debug/charting/dialogs/ChartEditorBaseMenu.hx b/source/funkin/ui/debug/charting/dialogs/ChartEditorBaseMenu.hx index 95200151e..106c3215f 100644 --- a/source/funkin/ui/debug/charting/dialogs/ChartEditorBaseMenu.hx +++ b/source/funkin/ui/debug/charting/dialogs/ChartEditorBaseMenu.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.dialogs; +#if FEATURE_CHART_EDITOR import haxe.ui.containers.menus.Menu; // @:nullSafety // TODO: Fix null safety when used with HaxeUI build macros. @@ -17,3 +18,4 @@ class ChartEditorBaseMenu extends Menu // this.destroyOnClose = true; } } +#end diff --git a/source/funkin/ui/debug/charting/dialogs/ChartEditorCharacterIconSelectorMenu.hx b/source/funkin/ui/debug/charting/dialogs/ChartEditorCharacterIconSelectorMenu.hx index feaf307ea..0a622d283 100644 --- a/source/funkin/ui/debug/charting/dialogs/ChartEditorCharacterIconSelectorMenu.hx +++ b/source/funkin/ui/debug/charting/dialogs/ChartEditorCharacterIconSelectorMenu.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.dialogs; +#if FEATURE_CHART_EDITOR import flixel.math.FlxPoint; import funkin.play.character.BaseCharacter.CharacterType; import funkin.data.character.CharacterData; @@ -147,3 +148,4 @@ class ChartEditorCharacterIconSelectorMenu extends ChartEditorBaseMenu return menu; } } +#end diff --git a/source/funkin/ui/debug/charting/dialogs/ChartEditorUploadChartDialog.hx b/source/funkin/ui/debug/charting/dialogs/ChartEditorUploadChartDialog.hx index e0b6b2b10..b30c482a1 100644 --- a/source/funkin/ui/debug/charting/dialogs/ChartEditorUploadChartDialog.hx +++ b/source/funkin/ui/debug/charting/dialogs/ChartEditorUploadChartDialog.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.dialogs; +#if FEATURE_CHART_EDITOR import funkin.input.Cursor; import funkin.ui.debug.charting.dialogs.ChartEditorBaseDialog.DialogDropTarget; import funkin.ui.debug.charting.dialogs.ChartEditorBaseDialog.DialogParams; @@ -161,3 +162,4 @@ class ChartEditorUploadChartDialog extends ChartEditorBaseDialog this.unlock(); } } +#end diff --git a/source/funkin/ui/debug/charting/dialogs/ChartEditorUploadVocalsDialog.hx b/source/funkin/ui/debug/charting/dialogs/ChartEditorUploadVocalsDialog.hx index c86c33eeb..e5ca4932b 100644 --- a/source/funkin/ui/debug/charting/dialogs/ChartEditorUploadVocalsDialog.hx +++ b/source/funkin/ui/debug/charting/dialogs/ChartEditorUploadVocalsDialog.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.dialogs; +#if FEATURE_CHART_EDITOR import funkin.input.Cursor; import funkin.ui.debug.charting.dialogs.ChartEditorBaseDialog.DialogDropTarget; import funkin.ui.debug.charting.dialogs.ChartEditorBaseDialog.DialogParams; @@ -307,3 +308,4 @@ class ChartEditorUploadVocalsEntry extends Box } } } +#end diff --git a/source/funkin/ui/debug/charting/dialogs/ChartEditorWelcomeDialog.hx b/source/funkin/ui/debug/charting/dialogs/ChartEditorWelcomeDialog.hx index e223334dc..edf3b4b09 100644 --- a/source/funkin/ui/debug/charting/dialogs/ChartEditorWelcomeDialog.hx +++ b/source/funkin/ui/debug/charting/dialogs/ChartEditorWelcomeDialog.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.dialogs; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongRegistry; import funkin.play.song.Song; import funkin.ui.debug.charting.ChartEditorState; @@ -242,3 +243,4 @@ class ChartEditorWelcomeDialog extends ChartEditorBaseDialog chartEditorState.openImportChartWizard('legacy', false); } } +#end diff --git a/source/funkin/ui/debug/charting/handlers/ChartEditorAudioHandler.hx b/source/funkin/ui/debug/charting/handlers/ChartEditorAudioHandler.hx index f01464893..206ecfd3b 100644 --- a/source/funkin/ui/debug/charting/handlers/ChartEditorAudioHandler.hx +++ b/source/funkin/ui/debug/charting/handlers/ChartEditorAudioHandler.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.handlers; +#if FEATURE_CHART_EDITOR import flixel.system.FlxAssets.FlxSoundAsset; import funkin.audio.VoicesGroup; import funkin.audio.FunkinSound; @@ -352,3 +353,4 @@ class ChartEditorAudioHandler return zipEntries; } } +#end diff --git a/source/funkin/ui/debug/charting/handlers/ChartEditorContextMenuHandler.hx b/source/funkin/ui/debug/charting/handlers/ChartEditorContextMenuHandler.hx index 19be483c3..0bd82862f 100644 --- a/source/funkin/ui/debug/charting/handlers/ChartEditorContextMenuHandler.hx +++ b/source/funkin/ui/debug/charting/handlers/ChartEditorContextMenuHandler.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.handlers; +#if FEATURE_CHART_EDITOR import funkin.ui.debug.charting.contextmenus.ChartEditorDefaultContextMenu; import funkin.ui.debug.charting.contextmenus.ChartEditorEventContextMenu; import funkin.ui.debug.charting.contextmenus.ChartEditorHoldNoteContextMenu; @@ -32,7 +33,6 @@ class ChartEditorContextMenuHandler existingDefaultContextMenu.left = xPos; existingDefaultContextMenu.top = yPos; Screen.instance.addComponent(existingDefaultContextMenu); - } else { @@ -150,3 +150,4 @@ class ChartEditorContextMenuHandler } } } +#end diff --git a/source/funkin/ui/debug/charting/handlers/ChartEditorDialogHandler.hx b/source/funkin/ui/debug/charting/handlers/ChartEditorDialogHandler.hx index ee3a8066a..96856f05c 100644 --- a/source/funkin/ui/debug/charting/handlers/ChartEditorDialogHandler.hx +++ b/source/funkin/ui/debug/charting/handlers/ChartEditorDialogHandler.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.handlers; +#if FEATURE_CHART_EDITOR import flixel.util.FlxTimer; import funkin.data.song.importer.FNFLegacyData; import funkin.data.song.importer.FNFLegacyImporter; @@ -1430,3 +1431,4 @@ class ChartEditorDialogHandler }); } } +#end diff --git a/source/funkin/ui/debug/charting/handlers/ChartEditorGamepadHandler.hx b/source/funkin/ui/debug/charting/handlers/ChartEditorGamepadHandler.hx index 70383d3fd..2480fb827 100644 --- a/source/funkin/ui/debug/charting/handlers/ChartEditorGamepadHandler.hx +++ b/source/funkin/ui/debug/charting/handlers/ChartEditorGamepadHandler.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.handlers; +#if FEATURE_CHART_EDITOR import haxe.ui.focus.FocusManager; import flixel.input.gamepad.FlxGamepad; import haxe.ui.actions.ActionManager; @@ -191,3 +192,4 @@ class ChartEditorGamepadActionInputSource implements IActionInputSource } } } +#end diff --git a/source/funkin/ui/debug/charting/handlers/ChartEditorImportExportHandler.hx b/source/funkin/ui/debug/charting/handlers/ChartEditorImportExportHandler.hx index 3ffcdaa57..ed4a125ff 100644 --- a/source/funkin/ui/debug/charting/handlers/ChartEditorImportExportHandler.hx +++ b/source/funkin/ui/debug/charting/handlers/ChartEditorImportExportHandler.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.handlers; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongNoteDataUtils; import funkin.util.VersionUtil; import funkin.util.DateUtil; @@ -549,3 +550,4 @@ class ChartEditorImportExportHandler } } } +#end diff --git a/source/funkin/ui/debug/charting/handlers/ChartEditorNotificationHandler.hx b/source/funkin/ui/debug/charting/handlers/ChartEditorNotificationHandler.hx index 1af610854..244f97602 100644 --- a/source/funkin/ui/debug/charting/handlers/ChartEditorNotificationHandler.hx +++ b/source/funkin/ui/debug/charting/handlers/ChartEditorNotificationHandler.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.handlers; +#if FEATURE_CHART_EDITOR import haxe.ui.components.Button; import haxe.ui.containers.HBox; import haxe.ui.notifications.Notification; @@ -152,3 +153,4 @@ typedef NotificationAction = text:String, callback:Void->Void } +#end diff --git a/source/funkin/ui/debug/charting/handlers/ChartEditorShortcutHandler.hx b/source/funkin/ui/debug/charting/handlers/ChartEditorShortcutHandler.hx index 62f1f4cbc..f29acc7f1 100644 --- a/source/funkin/ui/debug/charting/handlers/ChartEditorShortcutHandler.hx +++ b/source/funkin/ui/debug/charting/handlers/ChartEditorShortcutHandler.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.handlers; +#if FEATURE_CHART_EDITOR import funkin.util.PlatformUtil; /** @@ -64,3 +65,4 @@ class ChartEditorShortcutHandler return (PlatformUtil.isMacOS()) ? '⇧+${input}' : 'Shift+${input}'; } } +#end diff --git a/source/funkin/ui/debug/charting/handlers/ChartEditorThemeHandler.hx b/source/funkin/ui/debug/charting/handlers/ChartEditorThemeHandler.hx index d4c035504..2d0d4708e 100644 --- a/source/funkin/ui/debug/charting/handlers/ChartEditorThemeHandler.hx +++ b/source/funkin/ui/debug/charting/handlers/ChartEditorThemeHandler.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.handlers; +#if FEATURE_CHART_EDITOR import flixel.addons.display.FlxGridOverlay; import flixel.addons.display.FlxSliceSprite; import flixel.FlxSprite; @@ -435,3 +436,4 @@ class ChartEditorThemeHandler return playheadBlock.loadGraphic(playheadBlockBitmap); } } +#end diff --git a/source/funkin/ui/debug/charting/handlers/ChartEditorToolboxHandler.hx b/source/funkin/ui/debug/charting/handlers/ChartEditorToolboxHandler.hx index 609c75730..da3852233 100644 --- a/source/funkin/ui/debug/charting/handlers/ChartEditorToolboxHandler.hx +++ b/source/funkin/ui/debug/charting/handlers/ChartEditorToolboxHandler.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.handlers; +#if FEATURE_CHART_EDITOR import funkin.play.character.BaseCharacter.CharacterType; import haxe.ui.RuntimeComponentBuilder; import funkin.ui.haxeui.components.CharacterPlayer; @@ -396,3 +397,4 @@ class ChartEditorToolboxHandler static function onHideToolboxOpponentPreview(state:ChartEditorState, toolbox:CollapsibleDialog):Void {} } +#end diff --git a/source/funkin/ui/debug/charting/toolboxes/ChartEditorBaseToolbox.hx b/source/funkin/ui/debug/charting/toolboxes/ChartEditorBaseToolbox.hx index 0dcd626a4..908b2a5a7 100644 --- a/source/funkin/ui/debug/charting/toolboxes/ChartEditorBaseToolbox.hx +++ b/source/funkin/ui/debug/charting/toolboxes/ChartEditorBaseToolbox.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.toolboxes; +#if FEATURE_CHART_EDITOR import haxe.ui.containers.dialogs.CollapsibleDialog; /** @@ -23,3 +24,4 @@ class ChartEditorBaseToolbox extends CollapsibleDialog */ public function refresh() {} } +#end diff --git a/source/funkin/ui/debug/charting/toolboxes/ChartEditorDifficultyToolbox.hx b/source/funkin/ui/debug/charting/toolboxes/ChartEditorDifficultyToolbox.hx index 2fe108df5..f8698dc49 100644 --- a/source/funkin/ui/debug/charting/toolboxes/ChartEditorDifficultyToolbox.hx +++ b/source/funkin/ui/debug/charting/toolboxes/ChartEditorDifficultyToolbox.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.toolboxes; +#if FEATURE_CHART_EDITOR import funkin.data.song.SongData.SongChartData; import funkin.data.song.SongData.SongMetadata; import funkin.data.song.SongRegistry; @@ -303,3 +304,4 @@ class ChartEditorDifficultyToolbox extends ChartEditorBaseToolbox return new ChartEditorDifficultyToolbox(chartEditorState); } } +#end diff --git a/source/funkin/ui/debug/charting/toolboxes/ChartEditorEventDataToolbox.hx b/source/funkin/ui/debug/charting/toolboxes/ChartEditorEventDataToolbox.hx index d8fc2e619..67906deff 100644 --- a/source/funkin/ui/debug/charting/toolboxes/ChartEditorEventDataToolbox.hx +++ b/source/funkin/ui/debug/charting/toolboxes/ChartEditorEventDataToolbox.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.toolboxes; +#if FEATURE_CHART_EDITOR import funkin.data.event.SongEventSchema; import funkin.ui.debug.charting.util.ChartEditorDropdowns; import haxe.ui.components.CheckBox; @@ -312,3 +313,4 @@ class ChartEditorEventDataToolbox extends ChartEditorBaseToolbox return new ChartEditorEventDataToolbox(chartEditorState); } } +#end diff --git a/source/funkin/ui/debug/charting/toolboxes/ChartEditorFreeplayToolbox.hx b/source/funkin/ui/debug/charting/toolboxes/ChartEditorFreeplayToolbox.hx index 26850b9d1..ec4eae411 100644 --- a/source/funkin/ui/debug/charting/toolboxes/ChartEditorFreeplayToolbox.hx +++ b/source/funkin/ui/debug/charting/toolboxes/ChartEditorFreeplayToolbox.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.toolboxes; +#if FEATURE_CHART_EDITOR import flixel.addons.display.FlxTiledSprite; import flixel.math.FlxMath; import funkin.audio.SoundGroup; @@ -683,3 +684,4 @@ class ChartEditorFreeplayToolbox extends ChartEditorBaseToolbox return new ChartEditorFreeplayToolbox(chartEditorState); } } +#end diff --git a/source/funkin/ui/debug/charting/toolboxes/ChartEditorMetadataToolbox.hx b/source/funkin/ui/debug/charting/toolboxes/ChartEditorMetadataToolbox.hx index b03b684d9..b1afab2bb 100644 --- a/source/funkin/ui/debug/charting/toolboxes/ChartEditorMetadataToolbox.hx +++ b/source/funkin/ui/debug/charting/toolboxes/ChartEditorMetadataToolbox.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.toolboxes; +#if FEATURE_CHART_EDITOR import funkin.play.character.BaseCharacter.CharacterType; import funkin.data.character.CharacterData; import funkin.data.song.importer.ChartManifestData; @@ -388,3 +389,4 @@ class ChartEditorMetadataToolbox extends ChartEditorBaseToolbox return new ChartEditorMetadataToolbox(chartEditorState); } } +#end diff --git a/source/funkin/ui/debug/charting/toolboxes/ChartEditorNoteDataToolbox.hx b/source/funkin/ui/debug/charting/toolboxes/ChartEditorNoteDataToolbox.hx index 100654a02..19339409a 100644 --- a/source/funkin/ui/debug/charting/toolboxes/ChartEditorNoteDataToolbox.hx +++ b/source/funkin/ui/debug/charting/toolboxes/ChartEditorNoteDataToolbox.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.toolboxes; +#if FEATURE_CHART_EDITOR import haxe.ui.components.DropDown; import haxe.ui.components.TextField; import haxe.ui.components.Label; @@ -301,3 +302,4 @@ typedef ToolboxNoteKindParam = var label:Label; var component:Component; } +#end diff --git a/source/funkin/ui/debug/charting/toolboxes/ChartEditorOffsetsToolbox.hx b/source/funkin/ui/debug/charting/toolboxes/ChartEditorOffsetsToolbox.hx index 18e4a5caf..aa3411323 100644 --- a/source/funkin/ui/debug/charting/toolboxes/ChartEditorOffsetsToolbox.hx +++ b/source/funkin/ui/debug/charting/toolboxes/ChartEditorOffsetsToolbox.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.toolboxes; +#if FEATURE_CHART_EDITOR import funkin.audio.SoundGroup; import haxe.ui.components.Button; import haxe.ui.components.Label; @@ -841,3 +842,4 @@ enum Waveform OPPONENT; INSTRUMENTAL; } +#end diff --git a/source/funkin/ui/debug/charting/util/ChartEditorDropdowns.hx b/source/funkin/ui/debug/charting/util/ChartEditorDropdowns.hx index 836578a1f..ce34db998 100644 --- a/source/funkin/ui/debug/charting/util/ChartEditorDropdowns.hx +++ b/source/funkin/ui/debug/charting/util/ChartEditorDropdowns.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.charting.util; +#if FEATURE_CHART_EDITOR import funkin.data.notestyle.NoteStyleRegistry; import funkin.play.notes.notestyle.NoteStyle; import funkin.data.song.SongData.SongTimeChange; @@ -294,3 +295,5 @@ typedef DropDownEntry = id:String, text:String }; + +#end diff --git a/source/funkin/ui/debug/stage/CharStage.hx b/source/funkin/ui/debug/stage/CharStage.hx index 37e2e1c26..bcc247077 100644 --- a/source/funkin/ui/debug/stage/CharStage.hx +++ b/source/funkin/ui/debug/stage/CharStage.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.stage; +#if FEATURE_STAGE_EDITOR class CharStage extends SprStage { public function new(x:Float, y:Float, dragShitFunc:SprStage->Void) @@ -7,3 +8,4 @@ class CharStage extends SprStage super(x, y, dragShitFunc); } } +#end diff --git a/source/funkin/ui/debug/stage/SprStage.hx b/source/funkin/ui/debug/stage/SprStage.hx index e53f3bc26..85b5d2836 100644 --- a/source/funkin/ui/debug/stage/SprStage.hx +++ b/source/funkin/ui/debug/stage/SprStage.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.stage; +#if FEATURE_STAGE_EDITOR import flixel.FlxSprite; import flixel.input.mouse.FlxMouseEvent; import flixel.math.FlxPoint; @@ -47,3 +48,4 @@ class SprStage extends FlxSprite } } } +#end diff --git a/source/funkin/ui/debug/stage/StageBuilderState.hx b/source/funkin/ui/debug/stage/StageBuilderState.hx index c66fe7095..daa418c03 100644 --- a/source/funkin/ui/debug/stage/StageBuilderState.hx +++ b/source/funkin/ui/debug/stage/StageBuilderState.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.stage; +#if FEATURE_STAGE_EDITOR import flixel.FlxCamera; import flixel.FlxSprite; import flixel.addons.display.FlxGridOverlay; @@ -430,3 +431,4 @@ enum TOOLS GRABBING; BOYFRIEND; } +#end diff --git a/source/funkin/ui/debug/stage/StageEditorCommand.hx b/source/funkin/ui/debug/stage/StageEditorCommand.hx index ff59f67e5..f0817be61 100644 --- a/source/funkin/ui/debug/stage/StageEditorCommand.hx +++ b/source/funkin/ui/debug/stage/StageEditorCommand.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.stage; +#if FEATURE_STAGE_EDITOR import funkin.ui.debug.stage.StageOffsetSubState; import flixel.FlxSprite; @@ -80,3 +81,4 @@ class SelectPropCommand implements StageEditorCommand return "Selected" + prop; } } +#end diff --git a/source/funkin/ui/debug/stage/StageOffsetSubState.hx b/source/funkin/ui/debug/stage/StageOffsetSubState.hx index 437ea82b2..a14406fcf 100644 --- a/source/funkin/ui/debug/stage/StageOffsetSubState.hx +++ b/source/funkin/ui/debug/stage/StageOffsetSubState.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.stage; +#if FEATURE_STAGE_EDITOR import flixel.FlxSprite; import flixel.input.mouse.FlxMouseEvent; import flixel.math.FlxPoint; @@ -389,3 +390,4 @@ class StageOffsetSubState extends HaxeUISubState return stageLol.serialize(); } } +#end diff --git a/source/funkin/ui/debug/stage/StagetoolBar.hx b/source/funkin/ui/debug/stage/StagetoolBar.hx index 243fd3f69..6291ba3ed 100644 --- a/source/funkin/ui/debug/stage/StagetoolBar.hx +++ b/source/funkin/ui/debug/stage/StagetoolBar.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.stage; +#if FEATURE_STAGE_EDITOR import flixel.group.FlxGroup; class StagetoolBar extends FlxGroup @@ -12,3 +13,4 @@ class StagetoolBar extends FlxGroup super(); } } +#end diff --git a/source/funkin/ui/debug/stageeditor/StageEditorObject.hx b/source/funkin/ui/debug/stageeditor/StageEditorObject.hx index 30429fe05..29d807608 100644 --- a/source/funkin/ui/debug/stageeditor/StageEditorObject.hx +++ b/source/funkin/ui/debug/stageeditor/StageEditorObject.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.stageeditor; +#if FEATURE_STAGE_EDITOR import funkin.data.animation.AnimationData; import funkin.graphics.FunkinSprite; import funkin.graphics.shaders.InverseDotsShader; @@ -122,3 +123,4 @@ class StageEditorObject extends FunkinSprite } } } +#end diff --git a/source/funkin/ui/debug/stageeditor/StageEditorState.hx b/source/funkin/ui/debug/stageeditor/StageEditorState.hx index 47e563c4a..64e069da4 100644 --- a/source/funkin/ui/debug/stageeditor/StageEditorState.hx +++ b/source/funkin/ui/debug/stageeditor/StageEditorState.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.stageeditor; +#if FEATURE_STAGE_EDITOR import flixel.math.FlxPoint; import flixel.text.FlxText; import openfl.display.BitmapData; @@ -1560,6 +1561,7 @@ class StageEditorState extends UIState loadUrlDialog.showDialog(); } } +#end /** * Available themes for the stage editor state. diff --git a/source/funkin/ui/debug/stageeditor/components/AboutDialog.hx b/source/funkin/ui/debug/stageeditor/components/AboutDialog.hx index e419b964c..72c9b9443 100644 --- a/source/funkin/ui/debug/stageeditor/components/AboutDialog.hx +++ b/source/funkin/ui/debug/stageeditor/components/AboutDialog.hx @@ -1,6 +1,8 @@ package funkin.ui.debug.stageeditor.components; +#if FEATURE_STAGE_EDITOR import haxe.ui.containers.dialogs.Dialog; @:build(haxe.ui.macros.ComponentMacros.build("assets/exclude/data/ui/stage-editor/dialogs/about.xml")) class AboutDialog extends Dialog {} +#end diff --git a/source/funkin/ui/debug/stageeditor/components/BackupAvailableDialog.hx b/source/funkin/ui/debug/stageeditor/components/BackupAvailableDialog.hx index 38bbbada1..554bc619c 100644 --- a/source/funkin/ui/debug/stageeditor/components/BackupAvailableDialog.hx +++ b/source/funkin/ui/debug/stageeditor/components/BackupAvailableDialog.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.stageeditor.components; +#if FEATURE_STAGE_EDITOR import haxe.ui.containers.dialogs.Dialog; import haxe.ui.containers.dialogs.Dialog.DialogButton; import funkin.util.FileUtil; @@ -71,3 +72,4 @@ class BackupAvailableDialog extends Dialog }; } } +#end diff --git a/source/funkin/ui/debug/stageeditor/components/ExitConfirmDialog.hx b/source/funkin/ui/debug/stageeditor/components/ExitConfirmDialog.hx index 91669dc4a..8385a6b68 100644 --- a/source/funkin/ui/debug/stageeditor/components/ExitConfirmDialog.hx +++ b/source/funkin/ui/debug/stageeditor/components/ExitConfirmDialog.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.stageeditor.components; +#if FEATURE_STAGE_EDITOR import haxe.ui.containers.dialogs.Dialog; @:build(haxe.ui.macros.ComponentMacros.build("assets/exclude/data/ui/stage-editor/dialogs/exit-confirm.xml")) @@ -29,3 +30,4 @@ class ExitConfirmDialog extends Dialog fn(true); } } +#end diff --git a/source/funkin/ui/debug/stageeditor/components/FindObjDialog.hx b/source/funkin/ui/debug/stageeditor/components/FindObjDialog.hx index bb5b7ec52..64c186eb5 100644 --- a/source/funkin/ui/debug/stageeditor/components/FindObjDialog.hx +++ b/source/funkin/ui/debug/stageeditor/components/FindObjDialog.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.stageeditor.components; +#if FEATURE_STAGE_EDITOR import haxe.ui.containers.dialogs.Dialog; import haxe.ui.components.TextField; import haxe.ui.components.CheckBox; @@ -101,3 +102,4 @@ class FindObjDialog extends Dialog fn(done); } } +#end diff --git a/source/funkin/ui/debug/stageeditor/components/LoadFromUrlDialog.hx b/source/funkin/ui/debug/stageeditor/components/LoadFromUrlDialog.hx index 28fc08814..20eefc4a0 100644 --- a/source/funkin/ui/debug/stageeditor/components/LoadFromUrlDialog.hx +++ b/source/funkin/ui/debug/stageeditor/components/LoadFromUrlDialog.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.stageeditor.components; +#if FEATURE_STAGE_EDITOR import haxe.ui.containers.dialogs.Dialog; import lime.utils.Bytes; import haxe.ui.components.TextField; @@ -67,3 +68,4 @@ class LoadFromUrlDialog extends Dialog } } } +#end diff --git a/source/funkin/ui/debug/stageeditor/components/NewObjDialog.hx b/source/funkin/ui/debug/stageeditor/components/NewObjDialog.hx index 69cb81946..952fac625 100644 --- a/source/funkin/ui/debug/stageeditor/components/NewObjDialog.hx +++ b/source/funkin/ui/debug/stageeditor/components/NewObjDialog.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.stageeditor.components; +#if FEATURE_STAGE_EDITOR import haxe.ui.containers.dialogs.Dialog; import funkin.ui.debug.stageeditor.handlers.AssetDataHandler; import openfl.display.BitmapData; @@ -84,3 +85,4 @@ class NewObjDialog extends Dialog fn(done); } } +#end diff --git a/source/funkin/ui/debug/stageeditor/components/UserGuideDialog.hx b/source/funkin/ui/debug/stageeditor/components/UserGuideDialog.hx index 190267184..bf0a4ec34 100644 --- a/source/funkin/ui/debug/stageeditor/components/UserGuideDialog.hx +++ b/source/funkin/ui/debug/stageeditor/components/UserGuideDialog.hx @@ -1,6 +1,8 @@ package funkin.ui.debug.stageeditor.components; +#if FEATURE_STAGE_EDITOR import haxe.ui.containers.dialogs.Dialog; @:build(haxe.ui.macros.ComponentMacros.build("assets/exclude/data/ui/stage-editor/dialogs/user-guide.xml")) class UserGuideDialog extends Dialog {} +#end diff --git a/source/funkin/ui/debug/stageeditor/components/WelcomeDialog.hx b/source/funkin/ui/debug/stageeditor/components/WelcomeDialog.hx index f482686f3..0e85d7ce8 100644 --- a/source/funkin/ui/debug/stageeditor/components/WelcomeDialog.hx +++ b/source/funkin/ui/debug/stageeditor/components/WelcomeDialog.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.stageeditor.components; +#if FEATURE_STAGE_EDITOR import haxe.ui.containers.dialogs.Dialog; import haxe.ui.containers.dialogs.Dialogs; import haxe.ui.containers.dialogs.MessageBox.MessageBoxType; @@ -143,3 +144,4 @@ class WelcomeDialog extends Dialog destroy(); } } +#end diff --git a/source/funkin/ui/debug/stageeditor/handlers/AssetDataHandler.hx b/source/funkin/ui/debug/stageeditor/handlers/AssetDataHandler.hx index 0aca1dfdb..794210c32 100644 --- a/source/funkin/ui/debug/stageeditor/handlers/AssetDataHandler.hx +++ b/source/funkin/ui/debug/stageeditor/handlers/AssetDataHandler.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.stageeditor.handlers; +#if FEATURE_STAGE_EDITOR import flixel.graphics.frames.FlxAtlasFrames; import openfl.display.BitmapData; import flixel.FlxSprite; @@ -225,3 +226,4 @@ typedef StageEditorObjectData = var animData:String; var ?bitmap:BitmapData; } +#end diff --git a/source/funkin/ui/debug/stageeditor/handlers/StageDataHandler.hx b/source/funkin/ui/debug/stageeditor/handlers/StageDataHandler.hx index f4a8728d4..cb2a3d869 100644 --- a/source/funkin/ui/debug/stageeditor/handlers/StageDataHandler.hx +++ b/source/funkin/ui/debug/stageeditor/handlers/StageDataHandler.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.stageeditor.handlers; +#if FEATURE_STAGE_EDITOR import haxe.io.Bytes; import funkin.util.FileUtil; import openfl.display.BitmapData; @@ -384,3 +385,4 @@ class StageDataHandler state.updateMarkerPos(); } } +#end diff --git a/source/funkin/ui/debug/stageeditor/handlers/UndoRedoHandler.hx b/source/funkin/ui/debug/stageeditor/handlers/UndoRedoHandler.hx index 897d74ea1..6ee9669f1 100644 --- a/source/funkin/ui/debug/stageeditor/handlers/UndoRedoHandler.hx +++ b/source/funkin/ui/debug/stageeditor/handlers/UndoRedoHandler.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.stageeditor.handlers; +#if FEATURE_STAGE_EDITOR import funkin.play.character.BaseCharacter.CharacterType; import funkin.ui.debug.stageeditor.handlers.AssetDataHandler.StageEditorObjectData; import funkin.ui.debug.stageeditor.StageEditorState.StageEditorDialogType; @@ -193,3 +194,4 @@ enum abstract UndoActionType(String) from String */ var OBJECT_ROTATED = "object_rotated"; } +#end diff --git a/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorCharacterToolbox.hx b/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorCharacterToolbox.hx index 549bfc649..834c25615 100644 --- a/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorCharacterToolbox.hx +++ b/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorCharacterToolbox.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.stageeditor.toolboxes; +#if FEATURE_STAGE_EDITOR import haxe.ui.components.NumberStepper; import funkin.play.character.BaseCharacter.CharacterType; import funkin.data.character.CharacterData.CharacterDataParser; @@ -247,3 +248,4 @@ class StageEditorCharacterMenu extends Menu // copied from chart editor FlxTween.tween(this, {alpha: 1, y: this.y + 10}, 0.2, {ease: FlxEase.quartOut}); } } +#end diff --git a/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorDefaultToolbox.hx b/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorDefaultToolbox.hx index f8dbb983f..aba5fd792 100644 --- a/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorDefaultToolbox.hx +++ b/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorDefaultToolbox.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.stageeditor.toolboxes; +#if FEATURE_STAGE_EDITOR import haxe.ui.containers.dialogs.CollapsibleDialog; import funkin.audio.FunkinSound; @@ -42,3 +43,4 @@ class StageEditorDefaultToolbox extends CollapsibleDialog */ public function refresh() {} } +#end diff --git a/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorObjectAnimsToolbox.hx b/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorObjectAnimsToolbox.hx index 548feb444..e99d5a64f 100644 --- a/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorObjectAnimsToolbox.hx +++ b/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorObjectAnimsToolbox.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.stageeditor.toolboxes; +#if FEATURE_STAGE_EDITOR import haxe.ui.components.Button; import haxe.ui.components.CheckBox; import haxe.ui.components.DropDown; @@ -216,3 +217,4 @@ class StageEditorObjectAnimsToolbox extends StageEditorDefaultToolbox }); } } +#end diff --git a/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorObjectGraphicToolbox.hx b/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorObjectGraphicToolbox.hx index e3eb32570..a603d969b 100644 --- a/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorObjectGraphicToolbox.hx +++ b/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorObjectGraphicToolbox.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.stageeditor.toolboxes; +#if FEATURE_STAGE_EDITOR import flixel.graphics.frames.FlxAtlasFrames; import funkin.ui.debug.stageeditor.handlers.AssetDataHandler; import haxe.ui.components.Button; @@ -208,3 +209,4 @@ class StageEditorObjectGraphicToolbox extends StageEditorDefaultToolbox stageEditorState.updateDialog(OBJECT_ANIMS); } } +#end diff --git a/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorObjectPropertiesToolbox.hx b/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorObjectPropertiesToolbox.hx index 5dd3aceaa..15e0501dd 100644 --- a/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorObjectPropertiesToolbox.hx +++ b/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorObjectPropertiesToolbox.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.stageeditor.toolboxes; +#if FEATURE_STAGE_EDITOR import haxe.ui.containers.VBox; import haxe.ui.components.CheckBox; import haxe.ui.components.DropDown; @@ -293,3 +294,4 @@ private class ObjectTintView extends VBox dropdown.dispatch(event); } } +#end diff --git a/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorStageToolbox.hx b/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorStageToolbox.hx index 0224e693a..338458332 100644 --- a/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorStageToolbox.hx +++ b/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorStageToolbox.hx @@ -1,5 +1,6 @@ package funkin.ui.debug.stageeditor.toolboxes; +#if FEATURE_STAGE_EDITOR import haxe.ui.components.NumberStepper; import haxe.ui.components.TextField; import haxe.ui.components.DropDown; @@ -67,3 +68,4 @@ class StageEditorStageToolbox extends StageEditorDefaultToolbox stageLibraryDrop.selectedItem = stageEditorState.stageFolder; } } +#end diff --git a/source/funkin/ui/haxeui/HaxeUISubState.hx b/source/funkin/ui/haxeui/HaxeUISubState.hx index ed742648d..683165d04 100644 --- a/source/funkin/ui/haxeui/HaxeUISubState.hx +++ b/source/funkin/ui/haxeui/HaxeUISubState.hx @@ -1,5 +1,6 @@ package funkin.ui.haxeui; +#if FEATURE_HAXEUI import haxe.ui.RuntimeComponentBuilder; import haxe.ui.components.CheckBox; import haxe.ui.containers.menus.MenuCheckBox; @@ -179,3 +180,4 @@ class HaxeUISubState extends MusicBeatSubState component = null; } } +#end diff --git a/source/funkin/util/FileUtil.hx b/source/funkin/util/FileUtil.hx index b0e43f962..b60bda12a 100644 --- a/source/funkin/util/FileUtil.hx +++ b/source/funkin/util/FileUtil.hx @@ -8,10 +8,12 @@ import haxe.io.Path; import openfl.net.FileReference; import openfl.events.Event; import openfl.events.IOErrorEvent; +#if FEATURE_HAXEUI import haxe.ui.containers.dialogs.Dialog.DialogButton; import haxe.ui.containers.dialogs.Dialogs; import haxe.ui.containers.dialogs.Dialogs.SelectedFileInfo; import haxe.ui.containers.dialogs.Dialogs.FileDialogExtensionInfo; +#end using StringTools; @@ -27,6 +29,7 @@ class FileUtil public static final FILE_FILTER_PNG:FileFilter = new FileFilter("PNG Image (.png)", "*.png"); public static final FILE_FILTER_FNFS:FileFilter = new FileFilter("Friday Night Funkin' Stage (.fnfs)", "*.fnfs"); + #if FEATURE_HAXEUI public static final FILE_EXTENSION_INFO_FNFC:FileDialogExtensionInfo = { extension: 'fnfc', @@ -48,6 +51,7 @@ class FileUtil extension: 'fnfs', label: 'Friday Night Funkin\' Stage', }; + #end /** * Paths which should not be deleted or modified by scripts. @@ -106,6 +110,7 @@ class FileUtil } #end + #if FEATURE_HAXEUI /** * Browses for a single file, then calls `onSelect(fileInfo)` when a file is selected. * Powered by HaxeUI, so it works on all platforms. @@ -171,6 +176,7 @@ class FileUtil title: dialogTitle, }); } + #end /** * Browses for a directory, then calls `onSelect(path)` when a path chosen. @@ -1325,6 +1331,7 @@ class FileUtilSandboxed public static final FILE_FILTER_ZIP:FileFilter = FileUtil.FILE_FILTER_ZIP; public static final FILE_FILTER_PNG:FileFilter = FileUtil.FILE_FILTER_PNG; + #if FEATURE_HAXEUI public static final FILE_EXTENSION_INFO_FNFC:FileDialogExtensionInfo = FileUtil.FILE_EXTENSION_INFO_FNFC; public static final FILE_EXTENSION_INFO_ZIP:FileDialogExtensionInfo = FileUtil.FILE_EXTENSION_INFO_ZIP; public static final FILE_EXTENSION_INFO_PNG:FileDialogExtensionInfo = FileUtil.FILE_EXTENSION_INFO_PNG; @@ -1340,6 +1347,7 @@ class FileUtilSandboxed { FileUtil.browseForTextFile(dialogTitle, typeFilter, onSelect, onCancel); } + #end public static function browseForDirectory(?typeFilter:Array, onSelect:(String) -> Void, ?onCancel:() -> Void, ?defaultPath:String, ?dialogTitle:String):Bool diff --git a/source/funkin/util/HaxeUIUtil.hx b/source/funkin/util/HaxeUIUtil.hx index d063a5b19..a65659918 100644 --- a/source/funkin/util/HaxeUIUtil.hx +++ b/source/funkin/util/HaxeUIUtil.hx @@ -1,5 +1,6 @@ package funkin.util; +#if FEATURE_HAXEUI import haxe.ui.tooltips.ToolTipRegionOptions; @:nullSafety @@ -16,3 +17,4 @@ class HaxeUIUtil } } } +#end diff --git a/source/funkin/util/WindowUtil.hx b/source/funkin/util/WindowUtil.hx index ea6507a0b..e04fd2000 100644 --- a/source/funkin/util/WindowUtil.hx +++ b/source/funkin/util/WindowUtil.hx @@ -117,10 +117,12 @@ class WindowUtil #if (desktop || html5) openfl.Lib.current.stage.addEventListener(openfl.events.KeyboardEvent.KEY_DOWN, (e:openfl.events.KeyboardEvent) -> { + #if FEATURE_HAXEUI if (haxe.ui.focus.FocusManager.instance.focus != null) { return; } + #end for (key in PlayerSettings.player1.controls.getKeysForAction(WINDOW_FULLSCREEN)) { diff --git a/source/funkin/util/plugins/VolumePlugin.hx b/source/funkin/util/plugins/VolumePlugin.hx index 83ad9ae3e..ac9845809 100644 --- a/source/funkin/util/plugins/VolumePlugin.hx +++ b/source/funkin/util/plugins/VolumePlugin.hx @@ -22,7 +22,7 @@ class VolumePlugin extends FlxBasic { super.update(elapsed); - var isHaxeUIFocused:Bool = haxe.ui.focus.FocusManager.instance?.focus != null; + var isHaxeUIFocused:Bool = #if FEATURE_HAXEUI haxe.ui.focus.FocusManager.instance?.focus != null #else false #end; if (!isHaxeUIFocused) {