Skip to main content
Two blocking dialogs for asking the player something:
  • Bridge.Input — a modal form with one or more fields (text, number, select, slider, checkbox, …). Returns the entered values, or nil if cancelled.
  • Bridge.Confirm — a yes/no dialog with an optional danger styling. Returns a boolean.
Both block until the player answers, so call them inside a thread or callback.

Availability

Client only.

Input

Signature

Bridge.Input.Open(opts)
string
default:"Input"
The dialog heading. Also accepted as heading.
string
An icon shown in the header.
string
A muted sub-line under the title.
table[]
required
The form fields, in order. Also accepted as rows. Each field is shaped below.
boolean
default:"true"
Whether the player can dismiss the form (clicking the backdrop or Cancel). When false, they must submit.

Field shape

string
required
One of text, number, password, select, checkbox, slider, textarea.
string
required
The field label.
string
Helper text shown under the field.
string
Placeholder for text-like and select fields.
boolean
Marks the field with an accent asterisk.
table[]
For select fields — a list of { value, label } choices.
number
default:"0"
For slider fields — the minimum value.
number
default:"100"
For slider fields — the maximum value.
number
default:"1"
For slider fields — the increment.

Returns

table | nil
A list-style table of the entered values in field order (values[1], values[2], …). nil if the player cancelled.

Examples

Bridge.Input.Open yields until the player submits or cancels. Call it inside a CreateThread, command, or event callback.

Confirm

A focused yes/no dialog. Returns true only if the player confirms.

Signature

Bridge.Confirm.Open(opts)
string
default:"Are you sure?"
The dialog heading.
string
default:"Choose an action to continue."
The body text.
string
default:"Confirm"
The confirm button text.
string
default:"Cancel"
The cancel button text.
string
default:"default"
default or danger. danger styles the badge and confirm button in the destructive color.

Returns

boolean
true if the player confirmed, false if they cancelled or dismissed.

Examples

Both dialogs tint to the player’s theme accent (the confirm badge, the required-field asterisk), and danger confirms use the destructive color. Set atlas:ui "ox" (or atlas:ui:input / atlas:ui:confirm) to render the same calls through ox_lib instead.