Events

@:dox(show)update(content:String):Void

@:dox(show)start():Void

@:dox(show)submit():Void

@:dox(show)stop():Void

Constructor

@:value({ textCursorHeightFactor : 1, textCursorOffsetY : 0, textCursorOffsetX : 0 })new(selectionColor:Color, textCursorColor:Color, textCursorOffsetX:Float = 0, textCursorOffsetY:Float = 0, textCursorHeightFactor:Float = 1)

Variables

@:keepentity:Text

@:value(false)multiline:Bool = false

read onlyediting:Bool

@:value(false)disabled:Bool = false

@:value(null)container:Visual = null

Optional container on which pointer events are bound

@:value(null)read onlyselectText:SelectText = null

SelectText instance used internally to manage text selection. Will be defined after component has been assigned to an entity.

@:value(null)read onlyinitializerName:String = null

Methods

@:value({ selectionEnd : -1, selectionStart : -1 })startInput(selectionStart:Int = -1, selectionEnd:Int = -1):Void

textInputClosestPositionInLine(fromPosition:Int, fromLine:Int, toLine:Int):Int

textInputIndexForPosInLine(lineNumber:Int, lineOffset:Int):Int

Inherited Events

Defined by Entity

@:dox(show)dispose(entity:Entity):Void

@:dox(show)destroy(entity:Entity):Void

Inherited Variables

Defined by Entity

read onlyhasData:Bool

@:value(null)id:String = null

read onlydestroyed:Bool

read onlydisposed:Bool

@:value(null)read onlyautoruns:Array<Autorun> = null

@editablecomponents:ReadOnlyMap<String, Component>

Public components mapping. Contain components created separately with component() or macro-based components as well.

scriptContent:ScriptContent

Available with script plugin

script:Script

Available with script plugin

Inherited Methods

Defined by Entity

dispose():Void

Schedules destroy, at the end of the current frame.

unbindEvents():Void

Remove all events handlers from this entity.

autorun(run:() ‑> Void, ?afterRun:() ‑> Void):Autorun

Creates a new Autorun instance with the given callback associated with the current entity.

Parameters:

run

The run callback

Returns:

The autorun instance

tween(?easing:Easing, duration:Float, fromValue:Float, toValue:Float, update:(Float, Float) ‑> Void):Tween

component<C>(?name:String, ?component:Null<C>):C