class flixel.addons.ui.FlxInputText extends FlxText
Available on all platforms
Sub classes | ||||
![]() | FlxUIInputText |
|
FlxInputText v1.11, ported to Haxe * @author larsiusprime, (Lars Doucet) * @link http://github.com/haxeflixel/flixel-ui * * FlxInputText v1.10, Input text field extension for Flixel * @author Gama11, MrWalrus, nitramcero (Martín Sebastián Wain) * @link http://forums.flixel.org/index.php/topic,272.0.html * * Copyright (c) 2009 Martín Sebastián Wain * License: Creative Commons Attribution 3.0 United States * @link http://creativecommons.org/licenses/by/3.0/us/
Class Fields
Instance Fields
var caretIndex:Int
The position of the selection cursor. An index of 0 means the carat is before the character at index 0.
This regular expression will filter out (remove) everything that matches. * Automatically sets filterMode = FlxInputText.CUSTOM_FILTER.
var filterMode:Int
Defines what text to filter. It can be NOFILTER, ONLYALPHA, ONLYNUMERIC, ONLYALPHANUMERIC or CUSTOMFILTER * (Remember to append "FlxInputText." as a prefix to those constants)
Set the maximum length for the field (e.g. "3" * for Arcade type hi-score initials). 0 means unlimited.
function new(?X:Float = 0, ?Y:Float = 0, ?Width:Int = 150, ?Text:String = null, ?size:Int = 8, ?TextColor:Int = -16777216, ?BackgroundColor:Int = -1, ?EmbeddedFont:Bool = true):Void
X | The X position of the text. * |
Y | The Y position of the text. * |
Width | The width of the text object (height is determined automatically). * |
Text | The actual text you would like to display initially. * |
size | Initial size of the font * |
TextColor | The color of the text * |
BackgroundColor | The color of the background (FlxColor.TRANSPARENT for no background color) * |
EmbeddedFont | Whether this text field uses embedded fonts or not |