HaxeFlixel / flixel

Free, cross-platform 2D game engine powered by Haxe and OpenFL
https://haxeflixel.com/
MIT License
1.93k stars 427 forks source link

Fix bug with FlxG.mouse.load #3141

Closed NeeEoo closed 1 month ago

Geokureli commented 1 month ago

always provide example code that demonstrates a way to reproduce the bug, please

NeeEoo commented 1 month ago

always provide example code that demonstrates a way to reproduce the bug, please

@:bitmap("assets/images/ui/cursor.png")
class CustomCursor extends openfl.display.BitmapData {}

FlxG.mouse.load(CustomCursor);
NeeEoo commented 1 month ago

Nvm im dumb

Geokureli commented 1 month ago

Nvm im dumb

Why? this PR seemed legit to me, @NeeEoo

NeeEoo commented 1 month ago

Why? this PR seemed legit to me, @NeeEoo

Turns out you were supposed to be to o

@:bitmap("assets/images/ui/cursor.png")
class CustomCursor extends openfl.display.BitmapData {}

FlxG.mouse.load(new CustomCursor(0,0));

Plus my code would have crashed due to it not calling with the 0, 0

Geokureli commented 1 month ago

FWIW this function should probably take a FlxGraphicSource