class FlxMouseControl
package flixel.addons.plugin
extends FlxBasic
FlxMouseControl
@link http://www.photonstorm.com
Static variables
staticdragTarget:FlxExtendedMouseSprite
The FlxExtendedMouseSprite that is currently being dragged, if any.
staticisDragging:Bool = false
Is the mouse currently dragging a sprite? If you have just clicked but NOT yet moved the mouse then this might return false.
staticlinkToDeadZone:Bool = false
Instead of using a mouseZone (which is calculated in world coordinates) you can limit the mouse to the FlxG.camera.deadzone area instead. If set to true the mouse will use the camera deadzone. If false (or the deadzone is null) no check will take place. Note that this takes priority over the mouseZone above. If the mouseZone and deadzone are set, the deadzone is used.
staticmouseZone:FlxRect
The mouse can be set to only be active within a specific FlxRect region of the game world. If outside this FlxRect no clicks, drags or throws will be processed. If the mouse leaves this region while still dragging then the sprite is automatically dropped and its release handler is called. Set the FlxRect to null to disable the zone.
staticsortIndex:String = "y"
The value that the FlxExtendedMouseSprites are sorted by before deciding which is "on-top" for click select
Static methods
staticaddToStack(Item:FlxExtendedMouseSprite):Void
Adds the given FlxExtendedMouseSprite to the stack of potential sprites that were clicked, the stack is then sorted and the final sprite is selected from that
Parameters:
Item | The FlxExtendedMouseSprite that was clicked by the mouse |
---|