UI Elements

Provides client-side utility UI elements for interaction, feedback, and user experience. These are used as fallbacks when bridge UIs are unavailable or can be directly used in scripts.


Accessing UI

The UI elements are accessed exclusively through exports.


Client

notify(options)

Displays a notification popup to the player.

Parameters

Name
Type
Description

type

string

Notification type (success, error, info)

header

string

Header text (optional)

message

string

Message body of the notification

duration

number

Duration in milliseconds (default: 3500)

style

table

Optional custom CSS styling

Example


show_progressbar(options)

Displays a progress bar overlay.

Parameters

Name
Type
Description

header

string

Text shown above the progress bar

icon

string

FontAwesome icon class

duration

number

Duration in milliseconds

Example


hide_progressbar()

Hides the progress bar.

Example


show_circle(options)

Displays a progress circle.

Parameters

Name
Type
Description

message

string

Text displayed in the circle center

duration

number

Duration in seconds

Example


show_drawtext(options)

Displays drawtext UI overlay.

Parameters

Name
Type
Description

header

string

Title text

message

string

Subtitle message text

icon

string

FontAwesome icon class (optional)

keypress

string

Key indicator (optional)

bar_colour

string

HEX color code for bar (optional)

style

table

Optional custom CSS styling

Example


hide_drawtext()

Hides drawtext UI overlay.

Example


dialogue(dialogue_data, npc, coords)

Opens a dialogue interaction sequence.

Parameters

Name
Type
Description

dialogue

table

Dialogue data (header, lines, options)

npc

number

Entity ID of the speaking NPC

coords

vector3

Player-facing orientation vector

Example


context_menu(menu_data)

Opens a context menu with selectable items or toggles.

Parameters

Name
Type
Description

menu_data

table

Contains header and content config

Example


action_menu(menu_data)

Creates a layered action menu with submenu support.

Parameters

Name
Type
Description

menu_data

table

Menu content structure and actions

Example

Last updated