Skip to content

Commit

Permalink
Some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DetectiveBaldi authored Nov 20, 2023
1 parent 00311e9 commit 07544b0
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions flixel/input/mouse/FlxMouse.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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<Bitmap>;

/**
* Used to toggle the visiblity of the mouse cursor - works on both
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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

0 comments on commit 07544b0

Please sign in to comment.