Available since

4.6.0

.

Constructor

@:value({ InvertX : false, InvertY : false, DeadZone : 0.1, PixelsPerUnit : 10, Axis : FlxAnalogAxis.EITHER })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

Inherited Variables

Defined by FlxActionInputAnalog

@:value(0)read onlyx:Float = 0

read onlyxMoved:FlxInput<Int>

@:value(0)read onlyy:Float = 0

read onlyyMoved:FlxInput<Int>

Defined by FlxActionInput

@:value(false)read onlydestroyed:Bool = false

device:FlxInputDevice

Mouse, Keyboard, Gamepad, SteamController, etc.

deviceID:Int

Gamepad ID or Steam Controller handle (ignored for Mouse & Keyboard)

read onlyinputID:Int

Input code (FlxMouseButtonID, FlxKey, FlxGamepadInputID, or Steam Controller action handle)

read onlytrigger:FlxInputState

What state triggers this action (PRESSED, JUST_PRESSED, RELEASED, JUST_RELEASED)

type:FlxInputType

Digital or Analog

Inherited Methods