class flixel.addons.ui.FlxInputText extends FlxText

Available on all platforms

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

static var ALL_CASES:Int

static var CUSTOM_FILTER:Int

static var ENTER_ACTION:String

static var INPUT_ACTION:String

static var LOWER_CASE:Int

static var NO_FILTER:Int

static var ONLY_ALPHA:Int

static var ONLY_NUMERIC:Int

static var UPPER_CASE:Int

Instance Fields

var background:Bool

Whether or not the textbox has a background

var backgroundColor:Int

The color of the background of the textbox.

var caretColor:Int

The caret's color. Has the same color as the text by default.

var caretIndex:Int

The position of the selection cursor. An index of 0 means the carat is before the character at index 0.

var customFilterPattern:EReg

This regular expression will filter out (remove) everything that matches. * Automatically sets filterMode = FlxInputText.CUSTOM_FILTER.

var fieldBorderColor:Int

The color of the fieldBorders

var fieldBorderThickness:Int

The thickness of the fieldBorders

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)

var forceCase:Int

The Case that's being enforced. Either ALLCASES, UPPERCASE or LOWER_CASE.

var hasFocus:Bool

Whether or not the text box is the active object on the screen.

var lines:Int

Change the amount of lines that are allowed.

var maxLength:Int

Set the maximum length for the field (e.g. "3" * for Arcade type hi-score initials). 0 means unlimited.

var passwordMode:Bool

Whether or not the textfield is a password textfield

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

function callback(:String, :String):Void

A function called whenever the value changes from user input, or enter is pressed

function destroy():Void

Clean up memory

function draw():Void

Draw the caret in addition to the text.

function set_caretColor(i:Int):Int

function set_caretWidth(i:Int):Int

function update():Void

Check for mouse input every tick.