CorsixTH Lua Documentation

HotkeyBox Class

A window element used to accept hotkey configurations.

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

Method Index

Member Index

function HotkeyBox:abort()

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

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

function HotkeyBox: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 1429 of Lua/window.lua.

function HotkeyBox:confirm()

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

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

function HotkeyBox:keyInput(char, rawchar, modifiers)

Parameters:

NameTypeDescription
char ? ?
rawchar ? ?
modifiers ? ?

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

function HotkeyBox:setActive(active)

Set the hotkeybox active status to true or false, taking care of any additional things that need to be done: deactivate any other hotkeyboxes, 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 1383 of Lua/window.lua.

function HotkeyBox:setPosition(x, y)

Parameters:

NameTypeDescription
x ? ?
y ? ?

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

function HotkeyBox:setSize(width, height)

Parameters:

NameTypeDescription
width ? ?
height ? ?

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

function HotkeyBox: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 1446 of Lua/window.lua.