ui global · type Ui
Titles, chat, the action bar, boss bars, the sidebar and the tab list: for everyone in a room (the ui global, or room.ui), or for one player (player.ui, the same calls). "Everyone" below is one player on player.ui.
Functions 12
ui.title(opts: { title: Text?, subtitle: Text?, color: Ink?, fade_in: number?, stay: number?, fade_out: number?, })Shows a title and subtitle to everyone in the room; fades and stay are in seconds.
ui.actionbar(text: Text, color: Ink?)Shows a line above the hotbar to everyone in the room.
ui.bossbar(opts: { title: Text?, color: BarColor?, progress: number? }?) → BarShows a boss bar to everyone in the room and returns its handle; progress 0..1. 1.8 reads the title on its action bar.
ui.sidebar(opts: ({ title: Text?, lines: { Text }? } | false)?)Sets the sidebar for everyone in the room; lines run top to bottom and only changed lines are sent. nil or false removes the sidebar.
ui.tab(opts: { header: Text?, footer: Text? })Sets the player list's header and footer for everyone in the room.
ui.box(opts: { id: string?, width: number, height: number, color: Ink?, radius: number? }) → LayoutNodeThe pieces of a layout (see "Layouts"). Sizes are pixels of the game's own HUD; a box is 1 to 256 a side. An item with an id is live.
ui.image(opts: { id: string?, image: Texture, color: Ink? }) → LayoutNodeui.label(opts: { id: string?, text: string?, width: number?, align: LayoutAlign?, color: Ink? }) → LayoutNodeWords in the client's own letters, space to ~. Give a label whose words change a width.
ui.row(opts: { gap: number?, align: LayoutAlign?, [number]: LayoutNode }) → LayoutNodeThe children are the list part: ui.row{ gap = 4, a, b }.
ui.column(opts: { gap: number?, align: LayoutAlign?, [number]: LayoutNode }) → LayoutNodeui.stack(opts: { align: LayoutAlign?, [number]: LayoutNode }) → LayoutNodeui.define(name: string, opts: { anchor: "bottom"?, margin: number?, [number]: LayoutNode }) → LayoutA layout of one child, centred over the hotbar with its bottom edge margin pixels above the screen's (40, or 25 when hide_hud takes the hearts and the food away). While the pack loads only.