CorsixTH Lua Documentation

Textbox Class

A window element used to enter text

Declared on: line 836 of Lua/window.lua.

Method Index

Member Index

function Textbox:abort()

Set the box to not active and run abort callback, if any

Declared on: line 892 of Lua/window.lua.

function Textbox:allowedInput(types)

"misc": other characters, currently space and hyphen

"all": experimental category that allows, theoretically, all input

Parameters:

NameTypeDescription
types string or or or table One of, or an table of any number of input types

Declared on: line 1133 of Lua/window.lua.

function Textbox:characterLimit(limit)

Limit input to a maximum of [limit] characters.

Parameters:

NameTypeDescription
limit integer or or or nil Number of characters until the textbox will stop accepting input, or nil to deactivate limit.

Declared on: line 1150 of Lua/window.lua.

function Textbox:confirm()

Set the box to not active and run confirm callback, if any

Declared on: line 884 of Lua/window.lua.

function Textbox:drawCursor(canvas, x, y)

Parameters:

NameTypeDescription
canvas ? ?
x ? ?
y ? ?

Declared on: line 870 of Lua/window.lua.

function Textbox:input(char, rawchar, code)

Parameters:

NameTypeDescription
char ? ?
rawchar ? ?
code ? ?

Declared on: line 947 of Lua/window.lua.

function Textbox:setActive(active)

Set the textbox active status to true or false, taking care of any additional things that need to be done: deactivate any other textboxes, handle blinking cursor, keyboard repeat on/off, set button state accordingly

Parameters:

NameTypeDescription
active boolean whether to activate (true) or deactivate (false) the box

Declared on: line 900 of Lua/window.lua.

function Textbox:setPosition(x, y)

Parameters:

NameTypeDescription
x ? ?
y ? ?

Declared on: line 1169 of Lua/window.lua.

function Textbox:setSize(width, height)

Parameters:

NameTypeDescription
width ? ?
height ? ?

Declared on: line 1173 of Lua/window.lua.

function Textbox:setText(text)

Use empty string to make textbox a single line textbox (default).

Use table with empty string {""} to make it a multiline textbox.

Parameters:

NameTypeDescription
text string or or or table The string or list of strings the textbox should contain.

Declared on: line 1158 of Lua/window.lua.

Page generated on Sat Feb 07, 2015 at 18:38:28 by LDocGen.