Skip to content

Commit

Permalink
yeah keep flixel 5.6.2 please
Browse files Browse the repository at this point in the history
fixes camera pointer not showing, closes #812
  • Loading branch information
JordanSantiagoYT committed Dec 19, 2024
1 parent 4865e5f commit e668907
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
6 changes: 3 additions & 3 deletions setup/unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ echo Installing dependencies...
echo This might take a few moments depending on your internet speed.
haxelib install lime
haxelib install openfl
haxelib install flixel
haxelib install flixel-addons
haxelib install flixel-tools
haxelib install flixel 5.6.2
haxelib install flixel-addons 3.2.2
haxelib install flixel-tools 1.5.1
haxelib install flixel-ui
haxelib install hscript
haxelib install hxcpp-debug-server
Expand Down
6 changes: 3 additions & 3 deletions setup/windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ echo This might take a few moments depending on your internet speed.
@echo on
haxelib install lime
haxelib install openfl
haxelib install flixel
haxelib install flixel-addons
haxelib install flixel-tools
haxelib install flixel 5.6.2
haxelib install flixel-addons 3.2.2
haxelib install flixel-tools 1.5.1
haxelib install flixel-ui
haxelib install hxCodec 2.5.1
haxelib install hscript
Expand Down
29 changes: 15 additions & 14 deletions source/editors/CharacterEditorState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,9 @@ class CharacterEditorState extends MusicBeatState
ghostLayer = new FlxTypedGroup<FlxSprite>();
add(ghostLayer);

var pointer:FlxGraphic = FlxGraphic.fromClass(GraphicCursorCross);
cameraFollowPointer = new FlxSprite().loadGraphic(pointer);
cameraFollowPointer = new FlxSprite().loadGraphic(FlxGraphic.fromClass(GraphicCursorCross));
cameraFollowPointer.setGraphicSize(40, 40);
cameraFollowPointer.updateHitbox();
cameraFollowPointer.color = FlxColor.WHITE;
add(cameraFollowPointer);

changeBGbutton = new FlxButton(FlxG.width - 360, 25, "", function()
Expand Down Expand Up @@ -1182,18 +1180,21 @@ class CharacterEditorState extends MusicBeatState
}

function updatePointerPos() {
var x:Float = char.getMidpoint().x;
var y:Float = char.getMidpoint().y;
if(!char.isPlayer) {
x += 150 + char.cameraPosition[0];
} else {
x -= 100 + char.cameraPosition[0];
}
y -= 100 - char.cameraPosition[1];
if(char == null || cameraFollowPointer == null) return;

x -= cameraFollowPointer.width / 2;
y -= cameraFollowPointer.height / 2;
cameraFollowPointer.setPosition(x, y);
var offX:Float = 0;
var offY:Float = 0;
if(!char.isPlayer)
{
offX = char.getMidpoint().x + 150 + char.cameraPosition[0];
offY = char.getMidpoint().y - 100 + char.cameraPosition[1];
}
else
{
offX = char.getMidpoint().x - 100 - char.cameraPosition[0];
offY = char.getMidpoint().y - 100 + char.cameraPosition[1];
}
cameraFollowPointer.setPosition(offX, offY);
}

function findAnimationByName(name:String):AnimArray {
Expand Down

0 comments on commit e668907

Please sign in to comment.