Skip to content

Ui

The overlay: ImGui drawing helpers, toasts, the cursor and game input, and Wraith’s own UI. ImGui itself is the imgui area.

A tab in the Workbench, or a kind of them, from Ui.addWorkbenchTab. All on the Workbench’s thread. id is empty unless it’s multi. Only describe and draw are needed; without the rest, it has no New, keeps its label and closes when asked.

describe(): Wraith.WorkbenchTab.Info
draw(id: string): void
status(id: string): Wraith.WorkbenchTab.State
create(): string
keepOpen(id: string): boolean

Asked once, as it’s added

Uses WorkbenchTab.Info.

Asked each frame it shows

Uses WorkbenchTab.State.

For multi, from View’s New: a new one’s id, or empty for none

Its close button was pressed. True keeps it open, like to ask about saving first, then Contribution.close it. For multi, a closed one’s gone; else it comes back from View

A panel of the plugin’s in the Workbench.

isOpen(): boolean
focus(): void
remove(): void

Opens it and brings its tab to the front

Waits for a draw under way, except from inside a draw or a script. Fine to call twice.

A window of the plugin’s on the overlay. It starts closed.

isOpen(): boolean
setOpen(open: boolean): void
focus(): void
setUnsaved(unsaved: boolean): void
remove(): void

Opens it and brings it to the front

A dot in its title, for unsaved changes

Fine to call twice, or from inside its draw.

Handles over the game, drawn with the game plugin’s camera. Only the last shown one shows. Any thread. Draggable while the overlay has the mouse.

show(): void
hide(): void
place(world: import("salamander").Given<Wraith.Mat4>): void
setTool(tool: Wraith.Gizmo.Tool | Wraith.Gizmo.ToolName): void
setWorldAxes(on: boolean): void
moved(): Wraith.Mat4 | null
dragging(): boolean
hovered(): boolean
remove(): void

Shows it in front of any other. Needs a place.

Till the next show. Whichever was shown before shows again.

Its world transform, each tick, row-vector. Ignored while it’s dragged.

Uses Mat4.

Uses Gizmo.Tool.

Along the world’s axes rather than its own

Where it’s been dragged to since last asked, or null, including a drag’s end. Move yours there.

Uses Mat4.

The mouse was on it last frame, so a click there is for it.

Fine to call twice.

Plugins built against an older order still work, since tables are matched by name

Get it with Api.ui().

available(): boolean
displaySize(): Wraith.ImVec2
windowDrawList(): Wraith.ImDrawList | null
foregroundDrawList(): Wraith.ImDrawList | null
backgroundDrawList(): Wraith.ImDrawList | null
inputText(label: string | null, text: string, flags: Wraith.ImGuiInputTextFlags | Wraith.ImGuiInputTextFlagsName): string
inputMultiline(label: string | null, text: string, size: import("salamander").Given<Wraith.ImVec2>, flags: Wraith.ImGuiInputTextFlags | Wraith.ImGuiInputTextFlagsName): string
copyableText(id: string | null, text: string): void
clip(count: number, row: Wraith.Ui.ClipRow): void
tableSortedBy(): Wraith.Ui.SortSpec | null
editStruct(type: string, address: number | bigint): boolean
toast(toast: import("salamander").Given<Wraith.Toast>): number
updateToast(id: number, toast: import("salamander").Given<Wraith.Toast>): boolean
dismissToast(id: number): void
showCursor(show: boolean): void
setCursorHint(hint: Wraith.Ui.CursorHint | Wraith.Ui.CursorHintName): void
setMouseFree(free: boolean): void
takeInput(device: Wraith.Ui.InputDevice | Wraith.Ui.InputDeviceName, take: boolean): void
inputTaken(device: Wraith.Ui.InputDevice | Wraith.Ui.InputDeviceName): boolean
holdMouse(hold: boolean): void
mouseMotion(): Wraith.Point
addGizmo(): Wraith.Gizmo
slots(): Array<Wraith.Slot.Info>
addWindow(options: import("salamander").Given<Wraith.Window.Options>, draw: Wraith.Window.Draw): Wraith.Window
onOpenSettings(open: Wraith.Ui.OpenSettings): void
addWorkbenchPanel(options: import("salamander").Given<Wraith.WorkbenchPanel.Options>, draw: Wraith.WorkbenchPanel.Draw): Wraith.WorkbenchPanel
addWorkbenchTab(tab: Wraith.WorkbenchTab | null): Wraith.Contribution
contributeTo(slot: string, contribution: object | null): Wraith.Contribution
defineSlot(definition: import("salamander").Given<Wraith.Slot.Definition>): Wraith.Slot
showClass(class_name: string): void
imguiProc(name: string): number
imguiVersion(): number

False in games whose graphics it can’t hook

The game window’s size in pixels. Zero outside a draw callback.

Uses ImVec2.

The current window’s, foreground’s or background’s. Null outside a draw callback.

Uses ImDrawList.

Uses ImDrawList.

Uses ImDrawList.

Any length. Keeps the edit by label while typing, so text only shows once it’s left.

Uses ImGuiInputTextFlags.

Uses ImVec2, ImGuiInputTextFlags.

Text with a copy button

Calls row for each on-screen row of count equal-height rows

Uses Ui.ClipRow.

How the current table’s sorted, or null if the user hasn’t sorted it.

Uses Ui.SortSpec.

A schema struct as live controls, shaped by [Label], [Range], [ReadOnly] and [Hidden]. 0 address uses its [Instance]. False if it’s unknown or not made yet

Its id, or 0 without an overlay

Uses Toast.

False once it’s gone

Uses Toast.

While any plugin asks

Uses Ui.CursorHint.

For games that leave the cursor free, like FFXIV: Wraith only takes input over its windows. For game plugins; the player’s setting can override

Hides it from the game while any plugin asks

Uses Ui.InputDevice.

Uses Ui.InputDevice.

Locks the cursor hidden in the window centre from next frame while any plugin asks, for mouse-look.

Pixels moved since last frame while held, right and down positive. In a draw callback.

Uses Point.

Handles for moving, turning or scaling something. Gone with the plugin. Any thread.

Uses Gizmo.

Where a plugin can add to Wraith’s UI, plugins’ own slots too, and what each takes. Any thread.

Uses Slot.Info.

Drawn by draw while open; close, Esc, its hub tile and Settings button all just work. Gone with the plugin. Any thread.

Uses Window.Options, Window.Draw, Window.

What the plugin’s Settings button on the Mods page does, else Wraith’s Settings. Replaces any earlier one. Gone with the plugin

Uses Ui.OpenSettings.

A tab of its own in the Workbench, drawn by draw on the Workbench’s thread while showing. For tabs inside it, draw them with ImGui’s tab bars. Gone with the plugin. Any thread. The same as contributing to the workbench slot, with kind/id as its id

Uses WorkbenchPanel.Options, WorkbenchPanel.Draw, WorkbenchPanel.

A tab, or a kind of them, that tab draws and says more about, like several at once. In the workbench slot. Gone with the plugin. Any thread.

Fails with SlotError. Uses WorkbenchTab, Contribution.

Adds contribution, of the trait its slot says, like ScenePart, to a slot. Scripts name it, like salamander.implement("Wraith.ScenePart", obj). Gone with the plugin. Any thread

Fails with SlotError. Uses Contribution.

A slot of the plugin’s own, plugin.id to others, which they add objects of its trait to with contributeTo. Any thread

Fails with SlotError. Uses Slot.Definition, Slot.

Opens the Workbench’s Classes on a C# class by full name. Any thread.

A dcimgui function’s address by name, or 0

The hosted Dear ImGui version, like 19250

An enum of u8.

Value Name
0 info
1 success
2 warning
3 failure

A struct, 0x30 bytes, aligned to 8.

Offset Field Type
0x0 style Toast.Kind
0x8 title string Empty shows the plugin’s name
0x18 text string
0x28 seconds f32 Paused while hovered. 0 stays till clicked or dismissed.
style: Wraith.Toast.Kind | Wraith.Toast.KindName
title: string
text: string
seconds: number

On the Workbench’s own thread, not the render or game thread. Read what game-thread code left and queue changes for it, rather than calling into the game.

Wraith.WorkbenchPanel.Draw

top is with the documents, bottom with Addresses, left with Search

An enum of u8.

Value Name
0 top
1 bottom
2 left

A struct, 0x48 bytes, aligned to 8.

Offset Field Type
0x0 title string Its tab’s label
0x10 kind string What it is, like sheets. With id, how Wraith remembers where it was moved. Empty uses the title
0x20 id string Which one of its kind, for several at once, like an address. Can be empty
0x30 place WorkbenchPanel.Place Where it goes the first time it shows. Closed, it comes back from View, or with focus
0x34 order i32 Lower comes first among tabs in the same place. Wraith’s own are 100 apart, from 100, and 0 is after them
0x38 parent string Inside another tab, as one of its tabs: its kind for one of the plugin’s own, like ffxiv, else plugin/kind, like wraith/debug. Empty for one of its own
title: string
kind: string
id: string
place: Wraith.WorkbenchPanel.Place | Wraith.WorkbenchPanel.PlaceName
order: number
parent: string

A struct, 0x48 bytes, aligned to 8.

Offset Field Type
0x0 title string Its tab’s label. For multi, what View’s New item makes, and each one’s label till status says
0x10 kind string What it is, like sheets. How Wraith remembers where it was moved, with each one’s id. Empty uses the title
0x20 place WorkbenchPanel.Place
0x24 order i32 Lower comes first among tabs in the same place. Wraith’s own are 100 apart, from 100, and 0 is after them
0x28 multi bool Several at once, each with an id, and View has New for another. Else one, which View lists
0x30 parent string Inside another tab, as WorkbenchPanel.Options.parent says. Not with multi
0x40 parts bool Holds the tabs that name it as their parent, as tabs inside it, and isn’t drawn itself
title: string
kind: string
place: Wraith.WorkbenchPanel.Place | Wraith.WorkbenchPanel.PlaceName
order: number
multi: boolean
parent: string
parts: boolean

A struct, 0x18 bytes, aligned to 8.

Offset Field Type
0x0 title string Its tab’s label, which can change. Empty keeps the one before
0x10 unsaved bool A dot on its tab, like for a file not saved
title: string
unsaved: boolean

Draws a window’s contents, on the render thread between its Begin and End.

Wraith.Window.Draw

A struct, 0x48 bytes, aligned to 8.

Offset Field Type
0x0 title string Also tells it apart from the plugin’s other windows
0x10 size ImVec2 Starting size, unscaled. Zero lets ImGui pick
0x18 min_size ImVec2
0x20 max_size ImVec2 Zero for no limit that way
0x28 flags ImGuiWindowFlags
0x2c no_close bool No close button in its title bar
0x2d keep_on_escape bool Esc doesn’t close it
0x30 icon string A Lucide icon’s name, like “user” (see lucide.dev/icons), for a tile on the overlay’s bar that toggles it, through the hub slot. Empty for none
0x40 settings bool The plugin’s Settings button on the Mods page opens it
title: string
size: Wraith.ImVec2
min_size: Wraith.ImVec2
max_size: Wraith.ImVec2
flags: Wraith.ImGuiWindowFlags | Wraith.ImGuiWindowFlagsName
no_close: boolean
keep_on_escape: boolean
icon: string
settings: boolean

An enum of u8.

Value Name
0 move
1 rotate
2 scale

An enum of u8.

Value Name
0 auto
1 visible
2 hidden

What the overlay can take from the game.

An enum of u8.

Value Name
0 keyboard
1 mouse
2 gamepad

A struct, 0x8 bytes, aligned to 4.

Offset Field Type
0x0 column i32 In the order its columns were set up
0x4 descending bool
column: number
descending: boolean

One row of a clipped list.

Wraith.Ui.ClipRow

The Mods page’s Settings button, on the render thread inside a frame.

Wraith.Ui.OpenSettings

Made with ♥ by Asgard