From 07544b0d72a99313bc36a59b49fec6e656cdd0bf Mon Sep 17 00:00:00 2001 From: DetectiveBaldi <86160807+CaptainBaldi@users.noreply.github.com> Date: Mon, 20 Nov 2023 16:55:59 -0500 Subject: [PATCH] Some fixes --- flixel/input/mouse/FlxMouse.hx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/flixel/input/mouse/FlxMouse.hx b/flixel/input/mouse/FlxMouse.hx index 9eaa4a87d0..71a39f6818 100644 --- a/flixel/input/mouse/FlxMouse.hx +++ b/flixel/input/mouse/FlxMouse.hx @@ -53,9 +53,9 @@ class FlxMouse extends FlxPointer implements IFlxInputManager public var cursorContainer(default, null):Sprite; /** - * This is just a reference to the current cursor image, if there is one. + * The current cursor bitmap, if there is one. To set, use the `load` function. */ - public var cursor:Bitmap; + public var cursor(default, null):Null; /** * Used to toggle the visiblity of the mouse cursor - works on both @@ -197,6 +197,7 @@ class FlxMouse extends FlxPointer implements IFlxInputManager var _rightButton:FlxMouseButton; #end + var _cursor(get, set):Bitmap = null; var _cursorBitmapData:BitmapData; var _wheelUsed:Bool = false; var _visibleWhenFocusLost:Bool = true; @@ -756,5 +757,15 @@ class FlxMouse extends FlxPointer implements IFlxInputManager _globalScreenY = record.y; updatePositions(); } + + inline function get__cursor() + { + return cursor; + } + + inline function set__cursor(value:Bitmap) + { + return cursor = value; + } } #end