View source
class FlxActionInputAnalogClickAndDragMouseMotion
package flixel.input.actions
extends FlxActionInputAnalogMouseMotion › FlxActionInputAnalog › FlxActionInput
import flixel.input.actions.FlxActionInputAnalog
Available since
4.6.0
.Constructor
new(ButtonID:FlxMouseButtonID, Trigger:FlxAnalogState, Axis:FlxAnalogAxis = FlxAnalogAxis.EITHER, PixelsPerUnit:Int = 10, DeadZone:Float = 0.1, InvertY:Bool = false, InvertX:Bool = false)
Mouse input -- same as FlxActionInputAnalogMouseMotion, but requires a particular mouse button to be PRESSED Very useful for e.g. panning a map or canvas around
Parameters:
ButtonID | Button identifier (FlxMouseButtonID.LEFT / MIDDLE / RIGHT) |
---|---|
Trigger | What state triggers this action (MOVED, JUST_MOVED, STOPPED, JUST_STOPPED) |
Axis | which axes to monitor for triggering: X, Y, EITHER, or BOTH |
PixelsPerUnit | How many pixels of movement = 1.0 in analog motion (lower: more sensitive, higher: less sensitive) |
DeadZone | Minimum analog value before motion will be reported |
InvertY | Invert the Y axis |
InvertX | Invert the X axis |