Text UI
Display persistent text UI elements on the screen, typically used for interaction prompts.
Exports
| Export | Parameters | Returns |
|---|---|---|
ShowTextUI | (text, options) | — |
HideTextUI | () | — |
IsTextUIOpen | () | boolean |
ShowTextUI Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Text to display — keybind is parsed from [E] brackets |
Options
| Field | Type | Description |
|---|---|---|
key | string or false | Keybind letter override (e.g., 'G'), or false to hide the keybind box entirely |
icon | string | FontAwesome icon name or image URL |
iconColor | string | Custom icon color (hex or CSS color) |
iconAnimation | string | Icon animation: 'spin', 'beat', 'fade', 'bounce', 'shake', 'beatFade', 'spinPulse' |
position | string | 'right-center', 'left-center', 'top-center', 'bottom-center' |
label | string | Custom label text above the main text |
style | table | Custom CSS styles |
By default, the keybind box displays the key parsed from [KEY] brackets in the text (e.g., [E], [G]). If no brackets are found, it defaults to E. Use the key option to override this or hide it entirely.
Usage
Basic Text UI
exports['flux-ui-pack']:ShowTextUI('Press [E] to interact')With Icon
exports['flux-ui-pack']:ShowTextUI('Press [E] to open', {
icon = 'door-open',
iconColor = '#e74c3c',
iconAnimation = 'beat'
})Custom Position
exports['flux-ui-pack']:ShowTextUI('Press [G] to pick up', {
icon = 'hand',
position = 'top-center'
})Informational Display (No Keybind)
Use key = false to hide the keybind box entirely — useful for non-interactive info displays.
exports['flux-ui-pack']:ShowTextUI('Safe Zone', {
key = false,
label = 'INFO',
position = 'top-center'
})Custom Keybind Override
Override the parsed keybind with a specific key letter.
exports['flux-ui-pack']:ShowTextUI('Pick up item', {
key = 'G',
icon = 'hand'
})Hide Text UI
exports['flux-ui-pack']:HideTextUI()Check if Open
local isOpen = exports['flux-ui-pack']:IsTextUIOpen()
if isOpen then
print('Text UI is currently visible')
endLast updated on