A manager for tracking and dispatching events for input text objects. Normally accessed via the static FlxInputText.globalManager rather than being created separately.

Constructor

new()

Variables

read onlyfocus:IFlxInputText

The input text object that's currently in focus, or null if there isn't any.

read onlyisTyping:Bool

Returns whether or not there's currently an editable input text in focus.

@:value(new FlxTypedSignal<action:TypingAction>())finalonTypingAction:FlxTypedSignal<(action:TypingAction) ‑> Void> = new FlxTypedSignal<action:TypingAction>()

Methods

destroy():Void

Clean up memory.

registerInputText(input:IFlxInputText):Void

Registers an input text object, and initiates the event listeners if it's the first one to be added.

unregisterInputText(input:IFlxInputText):Void

Unregisters an input text object, and removes the event listeners if there aren't any more left.

Inherited Variables

Defined by FlxBasic

@:value(idEnumerator++)ID:Int = idEnumerator++

A unique ID starting from 0 and increasing by 1 for each subsequent FlxBasic that is created.

@:value(true)active:Bool = true

Controls whether update() is automatically called by FlxState/FlxGroup.

@:value(true)alive:Bool = true

Useful state for many game objects - "dead" (!alive) vs alive. kill() and revive() both flip this switch (along with exists, but you can override that).

camera:FlxCamera

Gets or sets the first camera of this object.

cameras:Array<FlxCamera>

This determines on which FlxCameras this object will be drawn. If it is null / has not been set, it uses the list of default draw targets, which is controlled via FlxG.camera.setDefaultDrawTarget as well as the DefaultDrawTarget argument of FlxG.camera.add.

read onlycontainer:Null<FlxContainer>

The parent containing this basic, typically if you check this recursively you should reach the state

Available since

5.7.0

.

@:value(true)exists:Bool = true

Controls whether update() and draw() are automatically called by FlxState/FlxGroup.

@:value(true)visible:Bool = true

Controls whether draw() is automatically called by FlxState/FlxGroup.

Inherited Methods

Defined by FlxBasic

draw():Void

Override this function to control how the object is drawn. Doing so is rarely necessary, but can be very useful.

getCameras():Array<FlxCamera>

The cameras that will draw this. Use this.cameras to set specific cameras for this object, otherwise the container's cameras are used, or the container's container and so on. If there is no container, say, if this is inside FlxGroups rather than a FlxContainer then the default draw cameras are returned.

Available since

5.7.0

.

getDefaultCamera():FlxCamera

The main camera that will draw this. Use this.cameras to set specific cameras for this object, otherwise the container's camera is used, or the container's container and so on. If there is no container, say, if this is inside FlxGroups rather than a FlxContainer then FlxG.camera is returned.

Available since

5.7.0

.

kill():Void

Handy function for "killing" game objects. Use reset() to revive them. Default behavior is to flag them as nonexistent AND dead. However, if you want the "corpse" to remain in the game, like to animate an effect or whatever, you should override this, setting only alive to false, and leaving exists true.

revive():Void

Handy function for bringing game objects "back to life". Just sets alive and exists back to true. In practice, this function is most often called by FlxObject#reset().

update(elapsed:Float):Void

Override this function to update your class's position and appearance. This is where most of your game rules and behavioral code will go.