From 871ef905eba8181e919c7fdf0163615f44921c3b Mon Sep 17 00:00:00 2001 From: CharlesCatYT <62410083+CharlesCatYT@users.noreply.github.com> Date: Tue, 21 May 2024 21:30:14 -0400 Subject: [PATCH] pointer fix Co-authored-by: rich <87835336+richTrash21@users.noreply.github.com> --- source/states/editors/CharacterEditorState.hx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/source/states/editors/CharacterEditorState.hx b/source/states/editors/CharacterEditorState.hx index 242df1d0333..712fcc54431 100644 --- a/source/states/editors/CharacterEditorState.hx +++ b/source/states/editors/CharacterEditorState.hx @@ -4,7 +4,6 @@ import flixel.FlxObject; import flixel.graphics.FlxGraphic; import flixel.animation.FlxAnimation; -import flixel.system.debug.interaction.tools.Pointer.GraphicCursorCross; import flixel.addons.ui.*; import flixel.ui.FlxButton; import flixel.util.FlxDestroyUtil; @@ -19,6 +18,14 @@ import objects.Character; import objects.HealthIcon; import objects.Bar; +// flixel 5.7.0+ fix +#if (FLX_DEBUG || flixel < version("5.7.0")) +typedef PointerGraphic = flixel.system.debug.interaction.tools.Pointer.GraphicCursorCross; +#else +@:bitmap("assets/images/debugger/cursorCross.png") +class PointerGraphic extends openfl.display.BitmapData {} +#end + class CharacterEditorState extends MusicBeatState { var character:Character; @@ -103,7 +110,7 @@ class CharacterEditorState extends MusicBeatState addCharacter(); - cameraFollowPointer = new FlxSprite().loadGraphic(FlxGraphic.fromClass(GraphicCursorCross)); + cameraFollowPointer = new FlxSprite(FlxGraphic.fromClass(PointerGraphic)); cameraFollowPointer.setGraphicSize(40, 40); cameraFollowPointer.updateHitbox(); add(cameraFollowPointer); @@ -1316,4 +1323,4 @@ class CharacterEditorState extends MusicBeatState _file.save(data, '$_char.json'); } } -} \ No newline at end of file +}