Wax

ui

Windows, overlays, notifications, hotkeys, themes and icons: everything under ui.

The Explorer searches everything on this page, and the classes of the game too.

ui

The GUI library: the menu (windows you click), overlays (panels you only read) and notifications.

Type name: WaxUI.

Open in the Explorer

MemberTypeDescription
IconsWaxIconsIcon names: the bundled Lucide set ("shield", "wrench", "map-pin" ...) plus images that mods register.
NotificationsWaxNotificationsWhat all notifications share: the corner they show in and how many show at once. It also counts them and closes them all.
DebugWaxDebugPanelThe in-game debug panel.
PicturesWaxPicturesThe game's own pictures, such as item icons, which a cell of a Slots control shows by their path. Loading them is given a few milliseconds a frame, so a picture can show a moment after it was asked for.
KeysWaxKeysThe keys that show and hide windows. Wax's own panel has one, and so has every mod that made a window: a key shows and hides its owner's windows and nobody else's. A mod's key is the one the player chose on the mod's card of the Mods page, else the one the mod asked for with ui.Window({ key = "F6" }), else a key Wax gives it once and remembers: one that no window and no hotkey of any mod uses. A press that your mod's own ui.Hotkey takes is not also taken as the key of its windows.
SignalHandler receivesDescription
OpenednothingFires when the menu opens: somebody's windows come up and the mouse is freed.
ClosednothingFires when the menu closes: nobody's windows are up any more and the game has the mouse back. A mod that opened the menu with windows = false also hears it when its own ui.Close() leaves the menu open for others.
KeyChangedkey: string?Fires with the new key of Wax's own panel. For any owner's key, use ui.Keys.Changed.
ThemeChangedname: stringFires with the theme's name after SetTheme or ResetTheme.
ScreenChangedwidth: number, height: numberFires once with the new size when ScreenSize gives another answer: after the game's window or the interface size has stopped changing for a moment, never while it is still being resized.
GameScreenChangedname: string?, tab: integer?Fires with what GameScreen answers, in the frame the game shows another of its menu screens, another tab of its main menu, or none any more (nil). Connect to it in place of asking GameScreen every frame: the game is only looked at while somebody listens.

ui.Open(options?)

Shows your mod's windows and frees the mouse to use them. Other mods' windows and the Wax panel stay as they are. In the command bar it is the Wax panel that comes up.

ui.Open(options?: { windows: boolean? })
ParameterTypeDescription
options (optional){ windows: boolean? }windows = false frees the mouse for panels only and brings no window up.

Returns nothing.

Open in the Explorer

ui.Close()

Hides your mod's windows again. The menu closes, and the game has the mouse back, once nobody's windows are up.

ui.Close()

Returns nothing.

Open in the Explorer

ui.Toggle()

Shows your mod's windows when they are away, and hides them when they are up.

ui.Toggle()

Returns nothing.

Open in the Explorer

ui.Copy(text)

Puts text on the clipboard, for pasting anywhere.

ui.Copy(text: any)
ParameterType
textany

Returns nothing.

Open in the Explorer

ui.TextWidth(text, options?)

How wide a line of text is drawn, in the units controls and panels are sized in. It is worked out from the letters, to within a few percent.

ui.TextWidth(text: any, options?: WaxTextOptions): number
ParameterType
textany
options (optional)WaxTextOptions

Returns number (width)

Open in the Explorer

ui.Shorten(text, width, options?)

The text if it fits in a width, else its start with "..." after it. A little room is kept spare, as the library does for its own text.

ui.Shorten(text: any, width: number, options?: WaxTextOptions): string, boolean
ParameterType
textany
widthnumber
options (optional)WaxTextOptions

Returns

  • string (shown)
  • boolean (cut) True when the text did not fit.

Open in the Explorer

ui.IsOpen()

True while the menu is open: the mouse is free, because somebody's windows are up.

ui.IsOpen(): boolean

Returns boolean

Open in the Explorer

ui.SetPreview(on)

Shows every window without taking the mouse (for screenshots and for looking while you play).

ui.SetPreview(on: boolean)
ParameterType
onboolean

Returns nothing.

Open in the Explorer

ui.IsPreview()

True while the windows are shown in preview.

ui.IsPreview(): boolean

Returns boolean

Open in the Explorer

ui.SetToggleKey(key)

Sets the key that shows and hides Wax's own panel, by the engine's key name ("F8"). nil leaves the panel without a key. A key that somebody has is given all the same, with a notice, as with ui.Keys.Set. Every mod has a key of its own: see ui.Keys.

ui.SetToggleKey(key: string?): boolean, string?
ParameterType
keystring?

Returns

  • boolean (changed)
  • string? (taken_by)

Open in the Explorer

ui.GetToggleKey()

The key that shows and hides Wax's own panel.

ui.GetToggleKey(): string?

Returns string?

Open in the Explorer

ui.Window(options?)

Creates a window in the menu. It is removed again when the mod reloads.

ui.Window(options?: WaxWindowOptions): WaxWindow
ParameterType
options (optional)WaxWindowOptions

Returns WaxWindow

Open in the Explorer

ui.Overlay(options?)

Creates a panel pinned to the screen that stays up during play and lets clicks through.

ui.Overlay(options?: WaxOverlayOptions): WaxOverlay
ParameterType
options (optional)WaxOverlayOptions

Returns WaxOverlay

Open in the Explorer

ui.Panel(options?)

Creates a panel whose controls take the mouse. It has no title bar and shows beside the game's own screens.

ui.Panel(options?: WaxPanelOptions): WaxOverlay
ParameterType
options (optional)WaxPanelOptions

Returns WaxOverlay

Open in the Explorer

ui.Hovered()

The value of the slot under the mouse, then its look and its Slots control. Nothing when no slot is under it.

ui.Hovered(): any, WaxSlotLook?, WaxSlots?

Returns

Open in the Explorer

ui.IsTyping()

True while a text box of Wax has the keyboard.

ui.IsTyping(): boolean

Returns boolean

Open in the Explorer

ui.ScreenSize()

The size of the screen in the units windows and panels are laid out in. It changes with the shape of the game's window and with the interface size. While the game is starting and has no screen yet, the answer is 1920 by 1080; ScreenChanged fires if the real one turns out different.

ui.ScreenSize(): number, number

Returns

  • number (width)
  • number (height)

Open in the Explorer

ui.FitGame(options?)

Draws the game's own menus (inventory, crafting, benches) smaller, which leaves room beside them for panels. They keep working as before. The request ends when the mod reloads.

ui.FitGame(options?: WaxFitOptions): WaxFit
ParameterType
options (optional)WaxFitOptions

Returns WaxFit

Open in the Explorer

ui.GameScreen()

The game's own menu screen that is showing now: "UMG_MainMenu", "UMG_EscapeMenu", or a bench or container such as "UMG_Processor_C". For the main menu the second value is its tab: 0 inventory, 1 crafting, 2 tech tree, 3 talents, 4 map. Nothing when none shows.

ui.GameScreen(): string?, integer?

Returns

  • string? (name)
  • integer? (tab)

Open in the Explorer

ui.Tag(target, options?)

Puts a line of text over an actor, over one part of an actor, or on a spot in the world. It follows what it is on, shows through walls, and tags that would cover each other pile up. The tag goes away by itself when the actor does.

ui.Tag(target: WaxInstance|{ X: number, Y: number, Z: number }, options?: WaxTagOptions): WaxTag
ParameterType
targetWaxInstance | { X: number, Y: number, Z: number }
options (optional)WaxTagOptions

Returns WaxTag

Open in the Explorer

ui.Notify(text, options?)

Shows a short message in a corner of the screen. Sending the same message again restarts the one already showing.

ui.Notify(text: any, options?: WaxNotifyOptions): WaxNotification
ParameterType
textany
options (optional)WaxNotifyOptions

Returns WaxNotification

Open in the Explorer

ui.Windows()

A list of every window.

ui.Windows(): WaxWindow[]

Returns WaxWindow[]

Open in the Explorer

ui.GameButton(spec, on_click?)

A button inside one of the game's own screens, in the game's style. Find the screen's parts from the player's UserInterface.Menus; the inventory card's Sort control is UMG_MainInventory.UMG_Sort, whose SortButton is the model and whose row holds the Type box and Sort.

ui.GameButton(spec: WaxGameButtonSpec, on_click?: fun()): WaxGameButton
ParameterTypeDescription
specWaxGameButtonSpec
on_click (optional)fun()Runs on a click, as a task.

Returns WaxGameButton

Open in the Explorer

ui.NeedsHost(control, text?)

Greys a control that cannot work on this game and says why while the mouse rests on it: by default that the host or the server has to run it. The control still takes clicks, so nothing is refused; what it does goes to the game, which answers. Pair it with mod.Side: if not mod.Side("host") then ui.NeedsHost(button) end.

ui.NeedsHost(control: WaxControl, text?: string): WaxControl
ParameterTypeDescription
controlWaxControl
text (optional)stringWhat the tip says instead.

Returns WaxControl (control) The same control.

Open in the Explorer

ui.Hotkey(key, callback, options?)

Runs callback when the key is pressed during play. The hotkey is removed when the mod reloads.

ui.Hotkey(key: string, callback: fun(), options?: WaxHotkeyOptions): WaxHotkey
ParameterTypeDescription
keystringAn engine key name such as "F6", "K" or "MiddleMouseButton" (a Keybind control gives you these). It can be held with Ctrl, Shift or Alt: "Ctrl+Three", "Ctrl+Shift+K".
callbackfun()
options (optional)WaxHotkeyOptions

Returns WaxHotkey

Open in the Explorer

ui.Bind(name, key, callback, options?)

A hotkey with a name. It runs callback when its key is pressed, like ui.Hotkey, and it is listed on your mod's card of the Mods page, where the player can give it another key. The player's choice is remembered and used the next time, so key is only where it starts. When two mods act on one key both still run, and the Mods page says which keys clash. Use it for every key a player might want to change.

ui.Bind(name: string, key: string?, callback: fun(), options?: WaxBindOptions): WaxBind
ParameterTypeDescription
namestringA name for the key that stays the same between versions, such as "Open". One mod cannot have two of one name.
keystring?The key it starts with, such as "F10" or "Ctrl+K". nil takes the key mod.lua names for it in keys, or none until the player gives one.
callbackfun()
options (optional)WaxBindOptions

Returns WaxBind

Open in the Explorer

ui.IsKeyDown(key)

True while the key is held down, as the game's own input reports it for the local player. It takes the key names ui.Hotkey takes. A name with Ctrl, Shift or Alt ("Ctrl+K") is true only while the key is down with exactly those held; a plain name is true whatever else is held. It is false while the game has no local player, and for a name the game does not know. It does not look at whether the menu is open or a text box has the keyboard (see ui.IsTyping). Every call asks the game, so use it in a loop that runs while something is held, such as one a ui.Hotkey started, and not in every frame of the game. It raises an error for a key that is not text, for empty text, and for a word before the key that is not Ctrl, Shift or Alt.

ui.IsKeyDown(key: string): boolean
ParameterTypeDescription
keystringAn engine key name such as "A", "LeftShift" or "MiddleMouseButton".

Returns boolean

Open in the Explorer

ui.MinScale()

The smallest interface size that still draws text at a readable size on this screen. It follows the size of the game's window.

ui.MinScale(): number

Returns number

Open in the Explorer

ui.SetScale(scale)

Sets the interface size, where 1 is normal. The size is kept between ui.MinScale() and 2, and the size applied is returned.

ui.SetScale(scale: number): number
ParameterType
scalenumber

Returns number (applied)

Open in the Explorer

ui.GetScale()

The interface size in use.

ui.GetScale(): number

Returns number

Open in the Explorer

ui.SetTheme(theme)

Switches to a named theme, or changes single settings from a table. Everything on screen takes the new colours in place, so no window is rebuilt and no mod is reloaded. Sizes and shapes apply to what is built afterwards.

ui.SetTheme(theme: WaxThemeName|WaxThemeSettings)
ParameterType
themeWaxThemeName | WaxThemeSettings

Returns nothing.

Open in the Explorer

ui.ResetTheme()

Puts every theme setting back to the "Midnight" defaults.

ui.ResetTheme()

Returns nothing.

Open in the Explorer

ui.Themes()

The names of the built-in themes, then of the ones added with AddTheme.

ui.Themes(): string[]

Returns string[]

Open in the Explorer

ui.AddTheme(name, colors)

Adds a theme: a table with any of the colour settings (window, panel, raised, text, accent ...) as "#RRGGBB".

ui.AddTheme(name: string, colors: WaxThemeSettings)
ParameterType
namestring
colorsWaxThemeSettings

Returns nothing.

Open in the Explorer

ui.ThemeName()

The name of the theme in use.

ui.ThemeName(): string

Returns string

Open in the Explorer

ui.Color(hex, alpha?)

Makes a colour from "#RRGGBB" or 0xRRGGBB, with an optional alpha of 0..1.

ui.Color(hex: string|integer, alpha?: number): WaxColor
ParameterType
hexstring | integer
alpha (optional)number

Returns WaxColor

Open in the Explorer

ui.Theme()

The table of the theme in use. Its colours follow the theme, so pass them as they are (color = ui.Theme().accent).

ui.Theme(): WaxTheme

Returns WaxTheme

Open in the Explorer

ui.AddSettings(container)

Adds Wax's own settings (the key of its panel, theme, accent, animation, size) to a container, such as a "Settings" page.

ui.AddSettings(container: WaxContainer)
ParameterType
containerWaxContainer

Returns nothing.

Open in the Explorer

ui.Settings(spec)

A settings window in one call: a window with a control for each field, values that are saved under your mod's name and come back the next time the game starts, presets, a Defaults button, and a signal that says when a value moves. lua local settings = ui.Settings({ title = "Bigger Stacks", icon = "layers", presets = { { "Balanced", { multiplier = 2 } }, { "Lots", { multiplier = 10 } } }, fields = { { "multiplier", "Stack multiplier", slider = { min = 1, max = 50, step = 1 }, default = 2 }, { "ammo", "Ammo too", toggle = true, default = false }, }, }) local function apply() ... end apply() settings.Changed:Connect(apply)

ui.Settings(spec: WaxSettingsSpec): WaxSettings
ParameterType
specWaxSettingsSpec

Returns WaxSettings

Open in the Explorer

ui.Pictures

The game's own pictures, such as item icons, which a cell of a Slots control shows by their path. Loading them is given a few milliseconds a frame, so a picture can show a moment after it was asked for.

Type name: WaxPictures.

Open in the Explorer

ui.Pictures.Check(path)

The game path of a picture as it can be shown ("/Game/.../ITEM_Wood.ITEM_Wood"), or nil when the text is not one.

ui.Pictures.Check(path: string): string?
ParameterType
pathstring

Returns string?

Open in the Explorer

ui.Pictures.Stats()

How many game pictures were loaded, failed, are waiting and are kept in memory.

ui.Pictures.Stats(): { loaded: integer, failed: integer, waiting: integer, pinned: integer, worst_ms: number }

Returns { loaded: integer, failed: integer, waiting: integer, pinned: integer, worst_ms: number }

Open in the Explorer

ui.Notifications

What all notifications share: the corner they show in and how many show at once. It also counts them and closes them all.

Type name: WaxNotifications.

Open in the Explorer

ui.Notifications.SetCorner(name)

Moves notifications to another corner of the screen, closing the ones showing.

ui.Notifications.SetCorner(name: WaxCorner)
ParameterType
nameWaxCorner

Returns nothing.

Open in the Explorer

ui.Notifications.SetLimit(count)

Sets how many notifications show at once (at least 1).

ui.Notifications.SetLimit(count: number)
ParameterType
countnumber

Returns nothing.

Open in the Explorer

ui.Notifications.Clear()

Closes every notification.

ui.Notifications.Clear()

Returns nothing.

Open in the Explorer

ui.Notifications.Count()

How many notifications are showing.

ui.Notifications.Count(): integer

Returns integer

Open in the Explorer

ui.Icons

Icon names: the bundled Lucide set ("shield", "wrench", "map-pin" ...) plus images that mods register.

Type name: WaxIcons.

Open in the Explorer

ui.Icons.Names()

Every icon name, sorted. The menu's Icons page shows them.

ui.Icons.Names(): string[]

Returns string[]

Open in the Explorer

ui.Icons.Has(name)

True when there is an icon with this name.

ui.Icons.Has(name: string): boolean
ParameterType
namestring

Returns boolean

Open in the Explorer

ui.Icons.Find(text?, limit?)

Names containing the text, at most limit of them (every name when the text is empty).

ui.Icons.Find(text?: string, limit?: integer): string[]
ParameterType
text (optional)string
limit (optional)integer

Returns string[]

Open in the Explorer

ui.Icons.Register(name, file)

Adds an icon from a PNG file. White on transparent works best, because the icon is tinted when drawn.

ui.Icons.Register(name: string, file: string)
ParameterType
namestring
filestring

Returns nothing.

Open in the Explorer

ui.Debug

The in-game debug panel.

Type name: WaxDebugPanel.

Open in the Explorer

ui.Debug.Page(name, options?)

Adds a page to the debug panel for the calling mod. The page is removed when the mod reloads.

ui.Debug.Page(name: string, options?: WaxPageOptions): WaxPage
ParameterType
namestring
options (optional)WaxPageOptions

Returns WaxPage

Open in the Explorer

ui.Debug.Window()

The debug panel's window, or nil while the panel is not running.

ui.Debug.Window(): WaxWindow?

Returns WaxWindow?

Open in the Explorer

ui.Debug.Show()

Shows the Wax panel and frees the mouse, whichever mod calls it. Your own windows stay as they are.

ui.Debug.Show()

Returns nothing.

Open in the Explorer

ui.Keys

The keys that show and hide windows. Wax's own panel has one, and so has every mod that made a window: a key shows and hides its owner's windows and nobody else's. A mod's key is the one the player chose on the mod's card of the Mods page, else the one the mod asked for with ui.Window({ key = "F6" }), else a key Wax gives it once and remembers: one that no window and no hotkey of any mod uses. A press that your mod's own ui.Hotkey takes is not also taken as the key of its windows.

Type name: WaxKeys.

Open in the Explorer

SignalHandler receivesDescription
Changedowner: string, key: string?Fires with the owner and its new key when a key is changed.
BindChangedowner: string, name: string, key: string?Fires when a named key of a mod is given another key.

ui.Keys.Get(owner?)

The key of an owner: "Wax" or a mod's id. Left out, it is the mod that asks.

ui.Keys.Get(owner?: string): string?
ParameterType
owner (optional)string

Returns string?

Open in the Explorer

ui.Keys.Set(owner, key)

Gives an owner another key, or none with nil. A key that another owner has, or that another mod uses as a hotkey, is given all the same: a notification says who else has it, the Mods page shows the clash, and the second value is that name.

ui.Keys.Set(owner: string, key: string?): boolean, string?
ParameterTypeDescription
ownerstring"Wax" or a mod's id.
keystring?An engine key name such as "F6". It can be held with Ctrl, Shift or Alt: "Ctrl+K".

Returns

  • boolean (changed)
  • string? (taken_by)

Open in the Explorer

ui.Keys.Named(owner)

The key a mod's mod.lua names for its windows (key = "F6"), as the player has it now. nil when mod.lua names none. It is known while the mod is not running.

ui.Keys.Named(owner: string): string?
ParameterTypeDescription
ownerstringA mod's id.

Returns string?

Open in the Explorer

ui.Keys.Owners()

Every owner that has a window, Wax first.

ui.Keys.Owners(): WaxKeyOwner[]

Returns WaxKeyOwner[]

Open in the Explorer

ui.Keys.Binds(owner?)

The named keys mods made with ui.Bind. With a mod's id, only that mod's, and for a mod that is not running the keys its mod.lua names.

ui.Keys.Binds(owner?: string): WaxKeyBind[]
ParameterType
owner (optional)string

Returns WaxKeyBind[]

Open in the Explorer

ui.Keys.SetBind(owner, name, key)

Gives a named key of a mod another key, or none with nil, and remembers it for that player. A key somebody else uses is taken all the same: a notification says who else has it, and ui.Keys.Clashes lists it.

ui.Keys.SetBind(owner: string, name: string, key: string?): boolean
ParameterTypeDescription
ownerstringA mod's id.
namestringThe name the mod gave the key.
keystring?An engine key name such as "F10" or "Ctrl+K".

Returns boolean (changed)

Open in the Explorer

ui.Keys.Clashes(owner?)

The keys that more than one owner acts on, one line of text for each: the Wax panel's key, the key of each mod's windows, every named key and every plain hotkey of a mod. With an owner, only the clashes that owner is part of, said from its side. An empty list when nothing clashes.

ui.Keys.Clashes(owner?: string): string[]
ParameterTypeDescription
owner (optional)string"Wax" or a mod's id.

Returns string[]

Open in the Explorer

WaxPage

A page of a window that has navigation. It is a container for controls.

It can also do everything WaxContainer can. You get one from window:Page, ui.Debug.Page.

Open in the Explorer

SignalHandler receivesDescription
PressedAgainnothingFires when the page's own name is pressed while the page is already showing. Use it to go back to the start of a page that has several views.
NearEndnothingFires while the end of the page is in view: when the user scrolls close to the bottom, and a few times a second while the page is not full. Add more content in the handler, or do nothing when there is no more.

WaxWindow

A window in the menu. Controls added to it go into its body, or into a first page called "Main" when it has pages. The player moves it by its title bar and resizes it by any edge or corner; the bottom right corner shows a grip. Resizing stops at the window's minimum size and at the edges of the screen. A mod's windows come up together, with that mod's key (see ui.Keys), and other mods' windows stay as they are.

It can also do everything WaxContainer can. You get one from ui.Debug.Window, ui.Window, ui.Windows. Below, window stands for one of these.

Open in the Explorer

SignalHandler receivesDescription
OpenednothingFires when the window is shown.
ClosednothingFires when the window is hidden.
PageChangedname: stringFires with the name of the page that was selected.

window:SetTitle(title)

Changes the text in the title bar.

window:SetTitle(title: string)
ParameterType
titlestring

Returns nothing.

Open in the Explorer

window:SetPosition(x, y)

Moves the window, keeping it on the screen.

window:SetPosition(x: number, y: number)
ParameterType
xnumber
ynumber

Returns nothing.

Open in the Explorer

window:SetSize(width, height)

Resizes the window, no smaller than its minimum size.

window:SetSize(width: number, height: number)
ParameterType
widthnumber
heightnumber

Returns nothing.

Open in the Explorer

window:SetNavWidth(width)

Sets the width of the navigation column of a window made with nav = "side".

window:SetNavWidth(width: number)
ParameterType
widthnumber

Returns nothing.

Open in the Explorer

window:Show()

Shows the window, in front of the others. While the menu is open it comes up at once, with your mod's other windows. While the menu is closed it waits for your mod's key or for ui.Open().

window:Show()

Returns nothing.

Open in the Explorer

window:Hide()

Hides the window. Hiding the last window that is up closes the menu.

window:Hide()

Returns nothing.

Open in the Explorer

window:SetVisible(shown)

Shows or hides the window.

window:SetVisible(shown: boolean)
ParameterType
shownboolean

Returns nothing.

Open in the Explorer

window:IsVisible()

True while the window is shown. A shown window is on screen only while its mod's windows are up: IsShowing tells you that.

window:IsVisible(): boolean

Returns boolean

Open in the Explorer

window:IsShowing()

True while the window is really on screen: it is shown, and its mod's windows are up (or every window is, in preview).

window:IsShowing(): boolean

Returns boolean

Open in the Explorer

window:SetMinimized(minimized)

Minimises the window to its title bar, or restores it.

window:SetMinimized(minimized: boolean)
ParameterType
minimizedboolean

Returns nothing.

Open in the Explorer

window:IsMinimized()

True while the window is minimised.

window:IsMinimized(): boolean

Returns boolean

Open in the Explorer

window:StatusBar(text?)

Adds a status line along the bottom of the window, or returns the one the window already has. text sets its message.

window:StatusBar(text?: any): WaxStatusBar
ParameterType
text (optional)any

Returns WaxStatusBar

Open in the Explorer

window:Destroy()

Removes the window and everything on it.

window:Destroy()

Returns nothing.

Open in the Explorer

window:Page(name, options?)

Adds a page to a window made with nav = "side" or "top". The first page added is selected.

window:Page(name: string, options?: WaxPageOptions): WaxPage
ParameterType
namestring
options (optional)WaxPageOptions

Returns WaxPage

Open in the Explorer

window:RemovePage(page)

Removes a page made with Page, with everything on it.

window:RemovePage(page: WaxPage)
ParameterType
pageWaxPage

Returns nothing.

Open in the Explorer

window:SelectPage(name)

Switches to the page with this name.

window:SelectPage(name: string)
ParameterType
namestring

Returns nothing.

Open in the Explorer

WaxStatusBar

The line along the bottom of a window that Window:StatusBar returns.

You get one from window:StatusBar. Below, statusBar stands for one of these.

Open in the Explorer

statusBar:Set(message?, options?)

Shows a message and removes the busy indicator.

statusBar:Set(message?: any, options?: WaxStatusOptions)
ParameterType
message (optional)any
options (optional)WaxStatusOptions

Returns nothing.

Open in the Explorer

statusBar:Busy(message?)

Shows a message with a turning indicator beside it, until the next Set.

statusBar:Busy(message?: any)
ParameterType
message (optional)any

Returns nothing.

Open in the Explorer

statusBar:Progress(amount?)

Shows a thin progress line across the top of the bar. amount is 0..1, and nil hides the line.

statusBar:Progress(amount?: number)
ParameterType
amount (optional)number

Returns nothing.

Open in the Explorer

statusBar:Right(message?)

Shows text at the right-hand end of the bar.

statusBar:Right(message?: any)
ParameterType
message (optional)any

Returns nothing.

Open in the Explorer

statusBar:Clear()

Empties the message and hides the progress line.

statusBar:Clear()

Returns nothing.

Open in the Explorer

WaxOverlay

A panel pinned to the screen that stays up during play and never takes the mouse.

It can also do everything WaxContainer can. You get one from ui.Overlay, ui.Panel. Below, overlay stands for one of these.

Open in the Explorer

SignalHandler receivesDescription
Scrolledsteps: integerOn a panel made with ui.Panel: the wheel was turned over it, 1 for down and -1 for up. The game does not see the wheel while the mouse is over a panel.
Resizedwidth: number, height: number?On a panel made with a place function: it was given another size, in its own units. Fires in the frame the screen changed.

overlay:SetVisible(shown)

Shows or hides the overlay.

overlay:SetVisible(shown: boolean)
ParameterType
shownboolean

Returns nothing.

Open in the Explorer

overlay:IsVisible()

True while the overlay is shown.

overlay:IsVisible(): boolean

Returns boolean

Open in the Explorer

overlay:SetAnchor(anchor, x?, y?)

Pins the overlay somewhere else. x and y keep their values when omitted.

overlay:SetAnchor(anchor: WaxAnchor, x?: number, y?: number)
ParameterType
anchorWaxAnchor
x (optional)number
y (optional)number

Returns nothing.

Open in the Explorer

overlay:Destroy()

Removes the overlay and everything on it.

overlay:Destroy()

Returns nothing.

Open in the Explorer

overlay:SetOffset(x?, y?)

Moves it without changing its anchor. x and y keep their values when omitted.

overlay:SetOffset(x?: number, y?: number)
ParameterType
x (optional)number
y (optional)number

Returns nothing.

Open in the Explorer

overlay:IsShowing()

True while it is really on screen: switched on, and what it waits for (the menu, the mouse) is there.

overlay:IsShowing(): boolean

Returns boolean

Open in the Explorer

WaxFit

A request to draw the game's own menus smaller.

You get one from ui.FitGame. Below, fit stands for one of these.

Open in the Explorer

fit:Set(scale, x?, y?)

Changes how large the game's menus are drawn, and how far they are moved when x or y is given. The numbers mean what the scale, x and y options mean.

fit:Set(scale: number, x?: number, y?: number)
ParameterTypeDescription
scalenumber
x (optional)numberKeeps its value when omitted.
y (optional)numberKeeps its value when omitted.

Returns nothing.

Open in the Explorer

fit:SetEnabled(on)

Switches the request on or off. While it is off the game's menus have their own size, unless another request is on.

fit:SetEnabled(on: boolean)
ParameterType
onboolean

Returns nothing.

Open in the Explorer

fit:Remove()

Gives the game's menus their own size back.

fit:Remove()

Returns nothing.

Open in the Explorer

WaxNotification

One message in a corner of the screen, as ui.Notify returns it. Once it has closed, its functions do nothing.

You get one from ui.Notify. Below, notification stands for one of these.

Open in the Explorer

notification:SetText(text)

Replaces the text.

notification:SetText(text: any)
ParameterType
textany

Returns nothing.

Open in the Explorer

notification:SetTitle(title)

Replaces the title. Does nothing on a notification made without one.

notification:SetTitle(title: string)
ParameterType
titlestring

Returns nothing.

Open in the Explorer

notification:SetProgress(amount)

Shows how far a task is, 0..1, in place of the countdown. The notification then stays until closed.

notification:SetProgress(amount: number)
ParameterType
amountnumber

Returns nothing.

Open in the Explorer

notification:Close()

Closes the notification.

notification:Close()

Returns nothing.

Open in the Explorer

WaxTag

A line of text that stays over something in the world.

You get one from ui.Tag. Below, tag stands for one of these.

Open in the Explorer

PropertyTypeDescription
InstanceWaxInstance?What the tag is on. nil for a tag on a spot.

tag:Set(text)

Replaces the text.

tag:Set(text: string)
ParameterType
textstring

Returns nothing.

Open in the Explorer

tag:SetColor(color)

Changes the colour of the text.

tag:SetColor(color: WaxColor|string)
ParameterType
colorWaxColor | string

Returns nothing.

Open in the Explorer

tag:SetRange(metres)

Sets how near the thing has to be for the tag to show, in metres. "outline" makes it show as far as outlines do.

tag:SetRange(metres: number|"outline")
ParameterType
metresnumber | "outline"

Returns nothing.

Open in the Explorer

tag:GetRange()

How near the thing has to be for the tag to show, in metres.

tag:GetRange(): number

Returns number

Open in the Explorer

tag:Remove()

Takes the tag off. Safe to call twice, and after the thing it was on is gone.

tag:Remove()

Returns nothing.

Open in the Explorer

WaxGameButton

A button inside one of the game's own screens, built from the same parts as the game's buttons, with the game's fill, font and colours. It can never widen the game's header: the row's size is read before and after, and when it would change, everything is undone and an error says how much width the room entries still have to give up. The button is removed when your mod unloads, and a mod that loads again first clears what an earlier life left behind.

You get one from ui.GameButton. Below, gameButton stands for one of these.

Open in the Explorer

SignalHandler receivesDescription
ClickednothingFires on a click: the button pressed and released under the mouse.

gameButton:SetCaption(caption)

Changes the words.

gameButton:SetCaption(caption: string)
ParameterType
captionstring

Returns nothing.

Open in the Explorer

gameButton:Remove()

Takes it out of the game's screen and gives the room back.

gameButton:Remove()

Returns nothing.

Open in the Explorer

gameButton:Exists()

False once it was removed, or the game threw its screen away.

gameButton:Exists(): boolean

Returns boolean

Open in the Explorer

WaxHotkey

A key that runs a function when it is pressed, as ui.Hotkey returns it.

You get one from ui.Hotkey. Below, hotkey stands for one of these.

Open in the Explorer

hotkey.Disconnect()

Stops the hotkey.

hotkey.Disconnect()

Returns nothing.

Open in the Explorer

hotkey:SetKey(key)

Changes the key it reacts to.

hotkey:SetKey(key: string)
ParameterType
keystring

Returns nothing.

Open in the Explorer

WaxBind

A named key of your mod, as ui.Bind returns it.

You get one from ui.Bind. Below, bind stands for one of these.

Open in the Explorer

SignalHandler receivesDescription
Changedkey: string?Fires with the new key when the player, or your mod, changes it.

bind:Get()

The key it has now. nil when the player left it without one.

bind:Get(): string?

Returns string?

Open in the Explorer

bind:Set(key)

Gives it another key, or none with nil, as the player does on the mod's card.

bind:Set(key: string?): boolean
ParameterType
keystring?

Returns boolean (changed)

Open in the Explorer

bind:Disconnect()

Takes the key away from your mod. It also goes when the mod unloads.

bind:Disconnect()

Returns nothing.

Open in the Explorer

WaxSettings

A settings window and its values.

You get one from ui.Settings. Below, settings stands for one of these.

Open in the Explorer

PropertyTypeDescription
valuestable<string, any>The values by key. Read them whenever you need them; they are kept up to date.
windowWaxWindowThe window, for SetVisible, SetPosition and anything else of a window.
sectionWaxSectionThe card the controls are in, to add controls of your own after them.
controlstable<string, WaxControl>The control of each key.
SignalHandler receivesDescription
Changedkey: string, value: anyFires with the key and the new value when the player, a preset, Set or Reset changes a setting. Handlers run as tasks and may pause.

settings:Get(key)

The value of one setting. An unknown key is an error.

settings:Get(key: string): any
ParameterType
keystring

Returns any

Open in the Explorer

settings:Set(key, value)

Sets one value: the control follows, the value is saved and Changed fires. A number outside a slider's range is kept inside it; a value the field cannot hold is an error. False when nothing moved.

settings:Set(key: string, value: any): boolean
ParameterType
keystring
valueany

Returns boolean

Open in the Explorer

settings:UsePreset(name)

Sets every value of a preset. False when the values already matched it.

settings:UsePreset(name: string): boolean
ParameterType
namestring

Returns boolean

Open in the Explorer

settings:Preset()

The name of the preset the values match, or "Custom".

settings:Preset(): string

Returns string

Open in the Explorer

settings:Reset()

Puts every default back.

settings:Reset(): boolean

Returns boolean

Open in the Explorer

WaxModel

A creature or any other skeletal mesh of the game, drawn in 3D. It turns slowly by itself until the player touches it. The model follows the mouse when dragged: to the right its near side goes right, and down it is seen more from above. The wheel moves the camera nearer and further while the mouse is over the view, and the page does not scroll then. Two presses in a row put the view back. Nothing is drawn while the view is not on screen.

It can also do everything WaxControl can. You get one from container:Model. Below, model stands for one of these.

Open in the Explorer

SignalHandler receivesDescription
LoadednothingThe model given at the start or to Show is in the picture.
Failedreason: stringThe mesh could not be loaded or is not a skeletal mesh, or the game could not make the view.
Turnedyaw: number, pitch: number, distance: numberThe player let go after a drag, turned the wheel or put the view back.
ClickednothingThe player pressed the view and let go without turning it.

model:Show(look)

Shows another model in the same box. The view goes back to where it starts, unless the first mesh is the one that shows already: the same body with other parts or other fur is seen from where the player left it.

model:Show(look: WaxModelLook)
ParameterType
lookWaxModelLook

Returns nothing.

Open in the Explorer

model:Clear()

Empties the box.

model:Clear()

Returns nothing.

Open in the Explorer

model:GetView()

Where the camera is: degrees round the model (0 looks at its front, 90 at its right side), degrees above it (negative is below), and how far away (1 fits the model in the box).

model:GetView(): number, number, number

Returns

  • number (yaw)
  • number (pitch)
  • number (distance)

Open in the Explorer

model:SetView(yaw?, pitch?, distance?)

Puts the camera somewhere. What is left out stays as it is. The slow turn stops.

model:SetView(yaw?: number, pitch?: number, distance?: number)
ParameterTypeDescription
yaw (optional)number
pitch (optional)numberKept between -20 and 75.
distance (optional)numberKept between 0.45 and 1.6.

Returns nothing.

Open in the Explorer

model:Reset()

Puts the view back where it started, and starts the slow turn again.

model:Reset()

Returns nothing.

Open in the Explorer

model:SetAnimation(animation, speed?)

Changes what plays: "walk", "idle", "blueprint", the game path of an animation, or false to stand still.

model:SetAnimation(animation: "walk"|"idle"|"blueprint"|string|false, speed?: number)
ParameterTypeDescription
animation"walk" | "idle" | "blueprint" | string | false
speed (optional)numberFor "blueprint": what the creature is said to move at. 0 stands, 150 walks.

Returns nothing.

Open in the Explorer

model:Attach(shape, options?)

Puts a shape from game.Assets:Mesh or game.Assets:Model on a socket or a bone of the model that shows: a tool in a hand, a hat on a head. The model has to be in the picture: wait for Loaded. It goes when another model is shown.

model:Attach(shape: WaxMesh, options?: { socket?: string, at?: table, turn?: table, scale?: number, material?: any })
ParameterType
shapeWaxMesh
options (optional){ socket?: string, at?: table, turn?: table, scale?: number, material?: any }

Returns nothing.

Open in the Explorer

model:Play(animation, options?)

Plays an animation from game.Animations:Define on the model that shows, so it can be looked at from every side before it is used in the world. The model has to be in the picture: wait for Loaded. Give the look facing = 0 for a mesh that faces along its own X, as the player's body does.

model:Play(animation: WaxAnimation, options?: WaxAnimationPlayOptions): WaxAnimationPlay
ParameterType
animationWaxAnimation
options (optional)WaxAnimationPlayOptions

Returns WaxAnimationPlay

Open in the Explorer

model:IsLoaded()

True once the model given at the start or to Show is in the picture.

model:IsLoaded(): boolean

Returns boolean

Open in the Explorer

WaxUnknownOption

Stands for any key an options table does not list, so that the editor reports a misspelt option.

Open in the Explorer

WaxOptions

The base of every options table.

Open in the Explorer

OptionTypeDescription
any other key ([string])WaxUnknownOptionStands for any key an options table does not list, so that the editor reports a misspelt option.

WaxColor

A colour in the linear form the engine uses. Make one with ui.Color.

Returned by ui.Color. Used by tag:SetColor, label:SetColor, progress:SetColor, field:SetColor.

Open in the Explorer

FieldType
Rnumber
Gnumber
Bnumber
Anumber

WaxTheme

The theme in use. Its colours change in place when the theme changes, so a colour taken from here (ui.Theme().good) follows the theme wherever you used it. Change the theme with ui.SetTheme, not by writing to this table.

Returned by ui.Theme.

Open in the Explorer

FieldTypeDescription
windowWaxColorWindow background.
outlineWaxColorWindow outline.
panelWaxColorText boxes, dropdown lists and consoles.
cardWaxColorSection background.
card_lineWaxColorSection outline.
raisedWaxColorButtons and tracks.
hoverWaxColorA colour in the linear form the engine uses. Make one with ui.Color.
pressWaxColorA colour in the linear form the engine uses. Make one with ui.Color.
lineWaxColorSeparators.
textWaxColorA colour in the linear form the engine uses. Make one with ui.Color.
dimWaxColorSecondary text.
accentWaxColorA colour in the linear form the engine uses. Make one with ui.Color.
accent_hoverWaxColorA colour in the linear form the engine uses. Make one with ui.Color.
goodWaxColorA colour in the linear form the engine uses. Make one with ui.Color.
warnWaxColorA colour in the linear form the engine uses. Make one with ui.Color.
badWaxColorA colour in the linear form the engine uses. Make one with ui.Color.
clearWaxColorFully transparent.
on_accentWaxColorText and knobs drawn on top of the accent colour.
font_sizenumber
title_sizenumber
small_sizenumber
spacingnumberGap between controls.
paddingnumber
row_heightnumber
bar_heightnumberHeight of a window's title bar.
nav_widthnumberDefault width of a side navigation column.
window_shapeWaxShape
control_shapeWaxShape
animationnumberSeconds for open, close and expand animations. 0 turns animation off.

WaxThemeSettings

Theme settings to change. Colours may be given as "#RRGGBB" or 0xRRGGBB.

Used by ui.SetTheme, ui.AddTheme.

Open in the Explorer

OptionType
windowWaxColor | string | integer
outlineWaxColor | string | integer
panelWaxColor | string | integer
cardWaxColor | string | integer
card_lineWaxColor | string | integer
raisedWaxColor | string | integer
hoverWaxColor | string | integer
pressWaxColor | string | integer
lineWaxColor | string | integer
textWaxColor | string | integer
dimWaxColor | string | integer
accentWaxColor | string | integer
accent_hoverWaxColor | string | integer
goodWaxColor | string | integer
warnWaxColor | string | integer
badWaxColor | string | integer
clearWaxColor | string | integer
on_accentWaxColor | string | integer
font_sizenumber
title_sizenumber
small_sizenumber
spacingnumber
paddingnumber
row_heightnumber
bar_heightnumber
nav_widthnumber
window_shapeWaxShape
control_shapeWaxShape
animationnumber

WaxWindowOptions

Used by ui.Window.

Open in the Explorer

OptionTypeDescription
titlestring"Window" when omitted.
iconstringIcon name shown before the title. The menu's Icons page lists the names.
widthnumberDefault 340, or 520 with side navigation.
heightnumberDefault 420, or 380 with pages.
xnumber
ynumber
closablebooleanFalse leaves out the close button.
resizablebooleanFalse makes a window the player cannot resize: it has no grip, its edges and corners do nothing, and it is always the size your mod gives it. SetSize still works.
visiblebooleanFalse creates the window hidden.
navWaxNavGives the window pages, listed down the side or along the top.
nav_widthnumberWidth of the side navigation column.
rememberbooleanFalse stops Wax remembering the window's position and size between sessions.
pinnedbooleanTrue keeps the window on the screen while the player plays, with the menu closed. It takes no clicks then, so the mouse stays with the game. With a menu open it is a window like any other.
keystringThe key that shows and hides your mod's windows, such as "F6" or "Ctrl+K". The first window a mod makes decides. Without it Wax gives the mod a key, and the player can choose another on the mod's card of the Mods page.

WaxPageOptions

Used by window:Page, ui.Debug.Page.

Open in the Explorer

OptionTypeDescription
iconstringIcon name shown before the page's name. The menu's Icons page lists the names.
bottombooleanLists the page at the bottom of a side navigation column.
scrollbooleanFalse makes a page that does not scroll. Its controls stack from the top, and a Grid or Console with no height takes the space left.

WaxStatusOptions

Used by statusBar:Set.

Open in the Explorer

OptionTypeDescription
kindWaxKindSets the colour of the text and the icon. "info" when omitted.
iconstringIcon name shown before the text. The menu's Icons page lists the names.

WaxOverlayOptions

Used by ui.Overlay.

Open in the Explorer

OptionTypeDescription
anchorWaxAnchorWhere on the screen the panel is pinned. "top-right" when omitted.
xnumberDistance in from the anchor's edge. Default 16.
ynumberDistance in from the anchor's edge. Default 16.
widthnumberDefault 240.
titlestringAdds a heading.
backgroundbooleanFalse leaves out the panel behind the controls.
movablebooleanFalse stops the player dragging it while the menu is open. Where it was dragged to is remembered.

WaxPanelOptions

Extends WaxOverlayOptions. Used by ui.Panel.

Open in the Explorer

OptionTypeDescription
when"cursor" | "menu" | "always"When it shows: "cursor" (the default) while the Wax menu is open or one of the game's own screens has the mouse, "menu" only with the Wax menu, "always" whenever it is switched on.
paddingnumberSpace between its edge and its controls.
heightnumberA fixed height. As tall as its controls when omitted.
zoomnumberDraws everything in it this much larger (1.25 is a quarter larger). Text stays sharp.
opacitynumberHow solid its background is, 0 to 1. 0.96 when omitted.
visiblebooleanFalse makes it hidden until SetVisible(true).
on_pressfun()Runs when the panel is pressed where it has no control.
placefun(screen_width: number, screen_height: number): WaxPanelPlaceWhere the panel goes on a screen of this size. It is asked when the panel is made and again, in the same frame, whenever the game's window changes size: the panel that exists is moved, sized and zoomed, and nothing is built again. The size is the real screen in the units the game lays its own menus out in, and the zoom is used as it is, so such a panel keeps its size beside the game's menus whatever the interface size is.

WaxPanelPlace

What a panel's place function answers. What is left out stays as it is.

Open in the Explorer

FieldType
x (optional)number
y (optional)number
width (optional)number
height (optional)number
zoom (optional)number

WaxFitOptions

Used by ui.FitGame.

Open in the Explorer

OptionTypeDescription
scalenumberHow large the game's menus are drawn, 0.5 to 1. 0.85 when omitted.
cornerWaxAnchorThe corner they shrink towards. "bottom-left" when omitted, which frees the right and the top.
xnumberMoves them sideways after they are made smaller, as a share of the screen. Right is positive.
ynumberMoves them up or down after they are made smaller, as a share of the screen. Down is positive.
enabledbooleanFalse makes the request wait for SetEnabled(true).

WaxNotifyOptions

Used by ui.Notify.

Open in the Explorer

OptionTypeDescription
titlestringA bold line above the text.
kindWaxKindSets the colour and the icon. "info" when omitted.
iconstringIcon name used in place of the kind's own. The menu's Icons page lists the names.
secondsnumberTime on screen. Default 4, and 0 keeps it until closed.
progressnumber0..1. Shows progress in place of the countdown and keeps the notification until closed.

WaxKeyOwner

One owner of windows, as ui.Keys.Owners lists it.

Returned by ui.Keys.Owners.

Open in the Explorer

FieldTypeDescription
idstring"Wax" for Wax's own panel, else the id of a mod.
namestringThe name to show: "Wax", or the mod's name.
keystring?Its key, or nil when it has none.
openbooleanTrue while its windows are up.

WaxKeyBind

One named key of a mod, as ui.Keys.Binds lists it.

Returned by ui.Keys.Binds.

Open in the Explorer

FieldTypeDescription
IdstringThe mod's id.
NamestringThe name the mod gave the key.
LabelstringWhat the mod's card calls it.
Keystring?The key it has now. nil when the player left it without one.
Defaultstring?The key the mod asked for.
Declaredboolean?true when the mod is not running and the key is known from its mod.lua.

WaxTextOptions

Used by ui.TextWidth, ui.Shorten.

Open in the Explorer

OptionTypeDescription
sizenumberThe font size. The interface's own when omitted.
facestring"Bold", "Book" or "Medium" (the default).
familystring"mono" for the fixed-width font.

WaxTagOptions

Used by ui.Tag.

Open in the Explorer

OptionTypeDescription
textstring
colorWaxColor | string
sizenumber
withinnumberMetres. Farther away than this the tag is not shown. Default 100.
outlinebooleanTrue shows the tag exactly as far as game.Highlight draws outlines (game.Highlight:GetRange()), in place of within.
fadebooleanThe tag gets smaller with distance and fades out over the last fifth of its range. True when omitted.
over_menusbooleanTrue keeps the tag showing while one of the game's screens or the Wax menu is open. Otherwise it is hidden then and comes back after.
liftnumberHow far above the thing's middle the tag sits, in centimetres. Worked out from the thing when omitted.

WaxGameButtonRoom

Open in the Explorer

FieldTypeDescription
boxanyA SizeBox of the row (one of the game's), such as the Type box beside Sort.
widthnumberThe width it gets instead of its own, in the game's units.

WaxGameButtonSpec

Used by ui.GameButton.

Open in the Explorer

FieldTypeDescription
likeanyOne of the game's own text buttons (a UMG_BasicButton_2_C, such as a Sort control's SortButton): its fill, font and colours are copied.
rowanyThe HorizontalBox of the game's screen the button goes into, such as the row that holds Type and Sort.
captionstringThe words on it, such as "STASH". The game's font draws them in capitals.
width (optional)numberIts width in the game's units. 130 when omitted.
room (optional)WaxGameButtonRoom[]Boxes of the row that give up width, so the row keeps its size.
grow (optional)booleanTrue for a row of your own that may grow: the size check is skipped.

WaxHotkeyOptions

Used by ui.Hotkey.

Open in the Explorer

OptionTypeDescription
in_menubooleanAlso reacts while the menu is open (off by default, so that typing in a box does not trigger it).
typingbooleanAlso reacts while a text box has the keyboard (for a key meant for the box, such as Tab).
hoverbooleanMakes it a key for the slot under the mouse: it only reacts while a slot is under it.

WaxBindOptions

The options of ui.Bind.

Used by ui.Bind.

Open in the Explorer

OptionTypeDescription
labelstringWhat the mod's card calls the key. The name when omitted.
in_menubooleantrue lets it run while the menu is open as well.
typingbooleantrue lets it run while a text box has the keyboard.

WaxSettingsField

One setting of a settings window. Its first entry is the key, its second the caption. Exactly one of slider, toggle, choices and text says what it is. A table with only heading draws a heading between fields instead.

Open in the Explorer

FieldTypeDescription
any other key ([1])stringThe key the value is kept under, such as "multiplier".
any other key ([2])stringThe caption shown beside the control.
defaultanyWhat the setting is until the player changes it. A number for a slider, a boolean for a toggle, one of the choices, or a string.
slider (optional){ min: number, max: number, step?: number, format?: string, live?: boolean }A number between min and max. The value is reported when the mouse lets go, unless live is true.
toggle (optional)booleanTrue for a switch.
choices (optional)any[]The choices of a dropdown.
text (optional)boolean | { hint?: string }True for a text box, or a table with the greyed text shown while it is empty.
help (optional)stringA dim line of explanation under the control.
heading (optional)stringA heading between fields, on a table of its own.

WaxSettingsSpec

Used by ui.Settings.

Open in the Explorer

FieldTypeDescription
titlestringThe window's title.
fieldsWaxSettingsField[]The settings, in the order they are shown.
presets (optional){ [1]: string, [2]: table<string, any> }[]Named sets of values, each { "Balanced", { multiplier = 2, weight = 0.5 } }. A Preset dropdown goes at the top; it reads "Custom" while the values match none.
icon (optional)stringThe window's icon.
name (optional)stringThe storage name the values are saved under. "settings" when omitted.
section (optional)stringThe title of the card the fields sit in. "Settings" when omitted.
key (optional)stringThe key that shows and hides the window, as ui.Window takes it.
width (optional)number
height (optional)number
x (optional)number
y (optional)number

WaxModelFur

The fur of a model: a second mesh that hair grows from. game.Creatures:GetModel fills it in from the creature's own data.

Open in the Explorer

FieldTypeDescription
meshstringThe game path of the mesh the fur grows from.
splines (optional)stringThe game path of the fur's splines.
layers (optional)integerHow many layers the fur is drawn in, 1 to 64.
length (optional)number
min_length (optional)number
bias (optional)number
noise (optional)number
hair_bias (optional)number
uniformity (optional)number
bare (optional)booleanTrue leaves out the faces that have no splines.
materials (optional)table<integer, string>Game paths of materials by slot, 1 first.
mask (optional)stringThe game path of a texture that says where no fur grows, as the game puts one on a mount's fur under some saddles. It goes on a copy of the fur's first material, so it only works when materials names that one.

WaxModelPart

One more mesh of a model, such as a piece of armour or a saddle. With nothing but a mesh it takes the pose of the first mesh, bone by bone. With a blueprint or a socket it is put on as the game puts a saddle on its mount: attached to the first mesh, and posed by its own blueprint.

Open in the Explorer

FieldTypeDescription
meshstringThe game path of a skeletal mesh.
materials (optional)table<integer, string>Game paths of materials by slot, 1 first.
blueprint (optional)stringThe game path of the part's own animation blueprint, one that copies the pose of another mesh, as every saddle of the game has. The part is attached to the first mesh and the blueprint is given that mesh to copy. When it cannot be loaded the part takes the first mesh's pose bone by bone instead.
socket (optional)stringA socket or a bone of the first mesh the part sits on, such as "RaptorSaddle". Left out, it sits on the mesh itself. A part on a socket is not counted when the model is fitted to its box.

WaxModelLook

What a Model control shows. Every path is a game path such as "/Game/ASS/CRE/Deer/SK_CRE_PAS_Deer"; a path with no dot gets its last part again. game.Creatures:GetModel gives one of these for a creature.

Used by model:Show.

Open in the Explorer

FieldTypeDescription
meshstringThe game path of a skeletal mesh.
materials (optional)table<integer, string>Game paths of materials to put on the mesh, by slot, 1 first.
parts (optional)WaxModelPart[]More meshes that move with the first: pieces on the same skeleton, or what the model wears.
fur (optional)WaxModelFur | WaxModelFur[]
walk (optional)stringThe game path of the animation "walk" plays.
idle (optional)stringThe game path of the animation "idle" plays.
loop (optional)stringThe game path of an animation for a model with no walk and no idle, such as flying.
animation (optional)"walk" | "idle" | "blueprint" | string | falseWhat plays, in a loop. "walk" (the default) plays walk, or idle or loop when there is none. "idle" plays idle, or loop when there is no walk either. "blueprint" runs the mesh's own animation blueprint. A game path plays that animation. false stands still.
blueprint (optional)stringThe game path of the mesh's own animation blueprint. Only used with animation = "blueprint".
speed (optional)numberWhat an animation blueprint is told the creature moves at: 0 stands, 150 (the default) walks. Only blueprints of the game's creature kind listen to it.
facing (optional)numberThe way the mesh faces as its creature's class turns it, in degrees. Default -90. The view starts in front of the model by it.
scale (optional)numberHow much larger the game draws the creature than its mesh. The view fits every model to its box, so it changes nothing there.
walks (optional)booleanTrue when there is a walk to play. game.Creatures:GetModel sets it; the view does not read it.
against (optional)WaxModelLookAnother model to be seen beside, such as a young animal's adult. This one is then as much smaller in its box as it is smaller than that one in the game, by the two meshes' sizes and their scale. It never fills less than four tenths of the box, and a model larger than the other fills the box as it would alone. Only mesh and scale of the other are read.

WaxModelOptions

Extends WaxModelLook. Used by container:Model.

Open in the Explorer

OptionTypeDescription
meshstringNothing shows until Show is called when this is left out.
widthnumberDefault 240.
heightnumberAs tall as it is wide when left out.
sizenumberThe side of a square view, in place of width and height.
align"left" | "center" | "right"Where the view sits in its line. Default "center".
backdropWaxColor | booleanA colour behind the model, or true for the theme's card colour. See-through when left out.
spinnumber | falseDegrees a second it turns by itself until the player touches it. Default 12.
turnbooleanFalse: the player cannot turn it.
zoombooleanFalse: the wheel is left to the page.
resetbooleanFalse leaves out the small button that puts the view back.
lightnumberHow bright the three lights are: 1 as designed, up to 4. At 0 the model is a dark shape.
yawnumberWhere the view starts, in degrees round the model: 0 looks at its front, 90 at its right side. Default -40.
pitchnumberHow many degrees above the model the view starts. Default 10. Kept between -20 and 75.
distancenumberHow far away the view starts: 1 fits the model in the box. Default 1. Kept between 0.45 and 1.6.

Named values

Short names for a fixed set of values. Where a function asks for one of these, pass one of the values listed.

WaxKind

One of "info", "good", "warn", "bad".

Open in the Explorer

WaxCorner

One of "top-left", "top-right", "bottom-left", "bottom-right".

Open in the Explorer

WaxAnchor

One of "top-left", "top", "top-right", "left", "center", "right", "bottom-left", "bottom", "bottom-right".

Open in the Explorer

WaxNav

One of "side", "top".

Open in the Explorer

WaxFontFamily

One of "ui", "mono", "plain".

Open in the Explorer

WaxThemeName

One of "Midnight", "Graphite", "Abyss", "Dune", "Prospector", "Ember", "Aurora", "Nebula", "Rosewood", "Terminal", "Daylight", "Glacier", "Sandstone", or any other string.

Open in the Explorer

WaxShape

One of "frame6", "frame8", "frame12", "top8", "glow12", "glow12_soft", "round2", "round3", "round4", "round5", "round6", "round7", "round8", "round9", "round10", "round12".

Open in the Explorer

On this page

uiui.Open(options?)ui.Close()ui.Toggle()ui.Copy(text)ui.TextWidth(text, options?)ui.Shorten(text, width, options?)ui.IsOpen()ui.SetPreview(on)ui.IsPreview()ui.SetToggleKey(key)ui.GetToggleKey()ui.Window(options?)ui.Overlay(options?)ui.Panel(options?)ui.Hovered()ui.IsTyping()ui.ScreenSize()ui.FitGame(options?)ui.GameScreen()ui.Tag(target, options?)ui.Notify(text, options?)ui.Windows()ui.GameButton(spec, on_click?)ui.NeedsHost(control, text?)ui.Hotkey(key, callback, options?)ui.Bind(name, key, callback, options?)ui.IsKeyDown(key)ui.MinScale()ui.SetScale(scale)ui.GetScale()ui.SetTheme(theme)ui.ResetTheme()ui.Themes()ui.AddTheme(name, colors)ui.ThemeName()ui.Color(hex, alpha?)ui.Theme()ui.AddSettings(container)ui.Settings(spec)ui.Picturesui.Pictures.Check(path)ui.Pictures.Stats()ui.Notificationsui.Notifications.SetCorner(name)ui.Notifications.SetLimit(count)ui.Notifications.Clear()ui.Notifications.Count()ui.Iconsui.Icons.Names()ui.Icons.Has(name)ui.Icons.Find(text?, limit?)ui.Icons.Register(name, file)ui.Debugui.Debug.Page(name, options?)ui.Debug.Window()ui.Debug.Show()ui.Keysui.Keys.Get(owner?)ui.Keys.Set(owner, key)ui.Keys.Named(owner)ui.Keys.Owners()ui.Keys.Binds(owner?)ui.Keys.SetBind(owner, name, key)ui.Keys.Clashes(owner?)WaxPageWaxWindowwindow:SetTitle(title)window:SetPosition(x, y)window:SetSize(width, height)window:SetNavWidth(width)window:Show()window:Hide()window:SetVisible(shown)window:IsVisible()window:IsShowing()window:SetMinimized(minimized)window:IsMinimized()window:StatusBar(text?)window:Destroy()window:Page(name, options?)window:RemovePage(page)window:SelectPage(name)WaxStatusBarstatusBar:Set(message?, options?)statusBar:Busy(message?)statusBar:Progress(amount?)statusBar:Right(message?)statusBar:Clear()WaxOverlayoverlay:SetVisible(shown)overlay:IsVisible()overlay:SetAnchor(anchor, x?, y?)overlay:Destroy()overlay:SetOffset(x?, y?)overlay:IsShowing()WaxFitfit:Set(scale, x?, y?)fit:SetEnabled(on)fit:Remove()WaxNotificationnotification:SetText(text)notification:SetTitle(title)notification:SetProgress(amount)notification:Close()WaxTagtag:Set(text)tag:SetColor(color)tag:SetRange(metres)tag:GetRange()tag:Remove()WaxGameButtongameButton:SetCaption(caption)gameButton:Remove()gameButton:Exists()WaxHotkeyhotkey.Disconnect()hotkey:SetKey(key)WaxBindbind:Get()bind:Set(key)bind:Disconnect()WaxSettingssettings:Get(key)settings:Set(key, value)settings:UsePreset(name)settings:Preset()settings:Reset()WaxModelmodel:Show(look)model:Clear()model:GetView()model:SetView(yaw?, pitch?, distance?)model:Reset()model:SetAnimation(animation, speed?)model:Attach(shape, options?)model:Play(animation, options?)model:IsLoaded()WaxUnknownOptionWaxOptionsWaxColorWaxThemeWaxThemeSettingsWaxWindowOptionsWaxPageOptionsWaxStatusOptionsWaxOverlayOptionsWaxPanelOptionsWaxPanelPlaceWaxFitOptionsWaxNotifyOptionsWaxKeyOwnerWaxKeyBindWaxTextOptionsWaxTagOptionsWaxGameButtonRoomWaxGameButtonSpecWaxHotkeyOptionsWaxBindOptionsWaxSettingsFieldWaxSettingsSpecWaxModelFurWaxModelPartWaxModelLookWaxModelOptionsNamed valuesWaxKindWaxCornerWaxAnchorWaxNavWaxFontFamilyWaxThemeNameWaxShape