OPX//77
opx_infinityprompts

prompts

Last updated on

The key strip — "press this to do that" rows any module can post, drawn with the player's own key bindings.

Draws the key strip: short rows such as "E — Open" or "F — Pick up", posted by whichever module has something to offer. A caller posts a group of rows under its own name. The module orders the groups, names every key with the player's current binding, cuts the strip to MAX_ROWS, and drops a group when its owner stops. Server modules can post to one player through the server contract.

Sideboth
Requiresnone
Optionaldowned, hud
Contractprompts v1 — server, client
Configconfig/prompts.lua (shared)
Datanone
  • The strip steps aside (without forgetting anything) while another surface holds the keyboard, while the HUD is turned off, and while the player is down.
  • One owner may hold 8 groups; 32 groups are held at most across all owners.
  • A row whose key cannot be named (no binding and no fallback) is held but not drawn.

Configuration

config/prompts.lua sets OPX.Config.MODULES.prompts. An invalid value is replaced by its default with a warning.

KeyDefaultEffect
enabledtruefalse switches the module off.
ANCHOR'bottom-right'bottom-right, bottom-left, top-right or top-left.
OFFSET0Pixels above the anchored edge, 0–540.
MAX_WIDTH420Widest row in pixels, 200–960.
MAX_ROWS10Rows drawn at once across all groups, 1–24.
HIDE_WHEN_CAPTUREDtrueHide while chat, a form or the pause menu holds the keyboard.
FOLLOW_HUDtrueHide while hud.IsVisible() answers visible = false.
TICK_MS150Milliseconds between two passes, 50–1000.
OWNER_SWEEP_MS1000Milliseconds between two checks that owners still run, 250–10000.

Refusal codes

All codes start with prompts..

CodeMeaning
prompts.invalidOwner / prompts.invalidIdOwner or group id is not a valid name.
prompts.invalidPlayerServer only: source is not a number.
prompts.invalidSpec / prompts.invalidPatchSpec or patch is not a table.
prompts.invalidTitle / prompts.invalidPriorityBad title or priority.
prompts.rowsRequired / prompts.tooManyRowsNo rows, or more than 8.
prompts.invalidRow / prompts.invalidRowId / prompts.duplicateRowIdBad row, row id, or repeated row id.
prompts.invalidLabel / prompts.invalidValueBad label or value.
prompts.invalidHold / prompts.invalidCombo / prompts.invalidDimNot a boolean.
prompts.keysRequired / prompts.invalidKey / prompts.invalidFallback / prompts.tooManyKeysBad keys entry, or more than 6 caps.
prompts.invalidValues / prompts.rowsAndValues / prompts.rowNotFoundBad values patch.
prompts.ownerLimit / prompts.limit8 groups for this owner, or 32 in total.
prompts.notFoundUpdate on a group the owner does not hold.

On this page