HotkeyBox Class
A window element used to accept hotkey configurations.
Method Index
- abort()
- allowedInput(types)
- clicked()
- confirm()
- keyInput(char, rawchar, modifiers)
- setActive(active)
- setPosition(x, y)
- setSize(width, height)
- setText(text)
Member Index
- abort_callback
- active
- allowed_input
- button
- char_limit
- confirm_callback
- enabled
- noted_keys
- panel
- text
- visible
function HotkeyBox:HotkeyBox()
Declared on: line 1348 of Lua/window.lua.
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:
| Name | Type | Description |
|---|---|---|
| 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:clicked()
Declared on: line 1408 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:
| Name | Type | Description |
|---|---|---|
| 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:
| Name | Type | Description |
|---|---|---|
| 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:
| Name | Type | Description |
|---|---|---|
| x | ? | ? |
| y | ? | ? |
Declared on: line 1457 of Lua/window.lua.
function HotkeyBox:setSize(width, height)
Parameters:
| Name | Type | Description |
|---|---|---|
| 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:
| Name | Type | Description |
|---|---|---|
| text | string or or or table | The string or list of strings the textbox should contain. |
Declared on: line 1446 of Lua/window.lua.