Adds a new functionality to Flixel debugger that allows any object on the screen to be dragged, moved or deleted while the game is still running.

@gmail.com)

Constructor

new(container:Sprite)

Variables

read onlyactiveTool:Tool

@:value(new FlxPoint())flixelPointer:FlxPoint = new FlxPoint()

@:value(false)finalmacKeyboard:Bool = false

Whether or not the user is using a mac keyboard, determines whether to use command or ctrl

@:value(false)pointerJustPressed:Bool = false

@:value(false)pointerJustReleased:Bool = false

@:value(false)pointerPressed:Bool = false

@:value(new FlxTypedGroup())read onlyselectedItems:FlxTypedGroup<FlxObject> = new FlxTypedGroup()

@:value(true)shouldDrawItemsSelection:Bool = true

Control if an outline should be drawn on selected elements. Tools can set this property to false if they want to draw custom selection marks, for instance.

Methods

addItemsWithinArea(items:Array<FlxObject>, members:Array<FlxBasic>, area:FlxRect):Void

Find all items within an area. In order to improve performance and reduce temporary allocations, the method has no return, you must pass an array where items will be placed. The method decides if an item is within the searching area or not by checking if the item's hitbox (obtained from getHitbox()) overlaps the area parameter.

Parameters:

items

Array where the method will place all found items. Any previous content in the array will be preserved.

members

Array where the method will recursively search for items.

area

A rectangle that describes the area where the method should search within.

Available since

5.6.0

.

addItemsWithinState(items:Array<FlxObject>, state:FlxState, area:FlxRect):Void

finds all items in the state and substate that are within the given area and adds them to the given list.

Parameters:

items

The list to add the items

state

The state to search

area

The rectangular area to search

Available since

5.6.0

.

addTool(tool:Tool):Void

Add a new tool to the interaction system.

Any tool added to the interaction system must extend the class flixel.system.debug.interaction.tools.Tool. The class contains several methods that can be used to provide new funcionalities to the interaction, or they can be overridden to alter existing behavior. For instance, tools can draw things on the screen, they can be activated when the user clicks a button, and so on. Check the classes in the package flixel.system.debug.interaction.tools for examples.

Parameters:

tool

instance of a tool that will be added to the interaction system.

destroy():Void

Clean up memory.

inlinefindItemsWithinArea(items:Array<FlxBasic>, members:Array<FlxBasic>, area:FlxRect):Void

Deprecated: "findItemsWithinArea is deprecated, use addItemsWithinArea"

Find all items within an area. In order to improve performance and reduce temporary allocations, the method has no return, you must pass an array where items will be placed. The method decides if an item is within the searching area or not by checking if the item's hitbox (obtained from getHitbox()) overlaps the area parameter.

Parameters:

items

Array where the method will place all found items. Any previous content in the array will be preserved.

members

Array where the method will recursively search for items.

area

A rectangle that describes the area where the method should search within.

inlinefindItemsWithinState(items:Array<FlxBasic>, state:FlxState, area:FlxRect):Void

Deprecated: "findItemsWithinState is deprecated, use getItemsWithinState or addItemsWithinState"

getItemsWithinState(state:FlxState, area:FlxRect):Array<FlxObject>

Returns a list all items in the state and substate that are within the given area

Parameters:

state

The state to search

area

The rectangular area to search

Available since

5.6.0

.

getTool(className:Class<Tool>):Tool

Obtain a reference to a tool that has been added to the interaction system and is available for use. This method can be used to access information provided by any tool in the system, or to change their behavior.

Parameters:

className

name of the class to be fetched, e.g. flixel.system.debug.interaction.tools.Pointer.

Returns:

Tool reference to the first tool found whose type matches the class name provided. If no tool is found, null is returned.

@:access(flixel.group.FlxTypedGroup)getTopItemWithinArea(members:Array<FlxBasic>, area:FlxRect):FlxObject

Searches the members for the top-most object inside the given rectangle

Parameters:

members

The list of FlxObjects or FlxGroups

area

The rectangular area to search

Returns:

The top-most item

Available since

5.6.0

.

getTopItemWithinState(state:FlxState, area:FlxRect):FlxObject

Finds and returns top-most item in the state and substate within the given area

Parameters:

state

The state to search

area

The rectangular area to search

Available since

5.6.0

.

isInUse():Bool

Informs whether the interactive debug is in use or not. Usage is defined as the interactive debug being visible and one of its tools is selected/active.

Returns:

true if the interactive debug is visible and one of its tools is selected/active.

removeTool(tool:Tool):Void

Removes the tool, if possible. If the tool has a button, all other buttons will be moved and the containing window will be resized, if needed.

Parameters:

tool

The tool to be removed

Available since

5.4.0

.

Inherited Variables

Defined by Window

Defined by Sprite

@:flash.propertybuttonMode:Bool

@:flash.propertyread onlydropTarget:DisplayObject

@:flash.propertyread onlygraphics:Graphics

@:flash.propertyhitArea:Sprite

@:flash.propertyuseHandCursor:Bool

Defined by DisplayObjectContainer

@:flash.propertymouseChildren:Bool

@:flash.propertyread onlynumChildren:Int

@:flash.propertytabChildren:Bool

@:flash.propertyread onlytextSnapshot:TextSnapshot

Defined by InteractiveObject

@:flash.propertycontextMenu:ContextMenu

@:flash.propertydoubleClickEnabled:Bool

@:flash.propertyfocusRect:Dynamic

@:flash.propertymouseEnabled:Bool

@:flash.property@:require(flash11)needsSoftKeyboard:Bool

@:flash.property@:require(flash11)softKeyboardInputAreaOfInterest:Rectangle

@:flash.propertytabEnabled:Bool

@:flash.propertytabIndex:Int

Defined by DisplayObject

@:flash.propertyalpha:Float

@:flash.propertyblendMode:BlendMode

@:flash.property@:require(flash10)write onlyblendShader:Shader

@:flash.propertycacheAsBitmap:Bool

@:flash.propertycacheAsBitmapMatrix:Matrix

@:flash.propertyfilters:Array<BitmapFilter>

@:flash.propertyheight:Float

@:flash.propertyread onlyloaderInfo:LoaderInfo

@:flash.propertymask:DisplayObject

@:flash.propertyread onlymouseX:Float

@:flash.propertyread onlymouseY:Float

@:flash.propertyname:String

@:flash.propertyopaqueBackground:Null<UInt>

@:flash.propertyread onlyparent:DisplayObjectContainer

@:flash.propertyread onlyroot:DisplayObject

@:flash.propertyrotation:Float

@:flash.property@:require(flash10)rotationX:Float

@:flash.property@:require(flash10)rotationY:Float

@:flash.property@:require(flash10)rotationZ:Float

@:flash.propertyscale9Grid:Rectangle

@:flash.propertyscaleX:Float

@:flash.propertyscaleY:Float

@:flash.property@:require(flash10)scaleZ:Float

@:flash.propertyscrollRect:Rectangle

@:flash.propertyshader:Shader

@:flash.propertyread onlystage:Stage

@:flash.propertytransform:Transform

@:flash.propertyvisible:Bool

@:flash.propertywidth:Float

@:flash.propertyx:Float

@:flash.propertyy:Float

@:flash.property@:require(flash10)z:Float

Inherited Methods

Defined by Window

bound():Void

Keep the window within the pre-specified bounding rectangle.

inlineputOnTop():Void

reposition(X:Float, Y:Float):Void

Change the position of the window. Subject to pre-specified bounding rectangles.

Parameters:

X

Desired X position of top left corner of the window.

Y

Desired Y position of top left corner of the window.

resize(Width:Float, Height:Float):Void

Resize the window. Subject to pre-specified minimums, maximums, and bounding rectangles.

Parameters:

Width

How wide to make the window.

Height

How tall to make the window.

Defined by Sprite

@:value({ bounds : null, lockCenter : false })startDrag(lockCenter:Bool = false, ?bounds:Null<Rectangle>):Void

@:value({ bounds : null, lockCenter : false })@:require(flash10_1)startTouchDrag(touchPointID:Int, lockCenter:Bool = false, ?bounds:Null<Rectangle>):Void

@:require(flash10_1)stopTouchDrag(touchPointID:Int):Void

Defined by DisplayObjectContainer

Defined by InteractiveObject

@:require(flash11)requestSoftKeyboard():Bool

Defined by DisplayObject

getBounds(targetCoordinateSpace:DisplayObject):Rectangle

getRect(targetCoordinateSpace:DisplayObject):Rectangle

@:require(flash10)globalToLocal3D(point:Point):Vector3D

@:value({ shapeFlag : false })hitTestPoint(x:Float, y:Float, shapeFlag:Bool = false):Bool

@:require(flash10)local3DToGlobal(point3d:Vector3D):Point

Defined by EventDispatcher

@:value({ useWeakReference : false, priority : 0, useCapture : false })addEventListener<T>(type:EventType<T>, listener:T ‑> Void, useCapture:Bool = false, priority:Int = 0, useWeakReference:Bool = false):Void

@:value({ useCapture : false })removeEventListener<T>(type:EventType<T>, listener:T ‑> Void, useCapture:Bool = false):Void