PlatinumSDK GUI widgets

Open searchable reader

panel

<panel id="1" x="0" y="0" width="200" height="40">…</panel>

General container for child elements; use layout/style attributes to arrange the children. Every element requires a unique exact u64 id. Shared geometry fields x/y default to 0; width defaults to 200 and height to 40. Dimensions must be finite and nonnegative. Renderer contracts are evidenced in crates/platinum-sdk/src/game/ui/runtime.rs. Activation records contain event, screen, element, action, value, player, tick and sequence. Only interactive controls generate activation records. Runtime callbacks and document access remain subject to host authority. Actual bundled examples follow where present; no example means source coverage is incomplete.

Public data fields
NameType / declarationDescription
idu64Required unique exact integer within this document.
x / yfinite number; optional px suffixPosition; defaults to 0 / 0.
width / heightfinite nonnegative number; optional px suffixDimensions; defaults to 200 / 40.
actionstringAuthored action identifier, copied to activation records; the host must authorize the action.
bindstringRuntime value key for text/value binding.
visible / disabled / visible-bindstring attributesVisibility/interaction gates read by the renderer; they do not replace authority checks.
Source-evidenced cross-language references
LuaEvent TableNative
engine.ui.get(document, id, property)
engine.ui.patch(document, id, properties)
UiDocument / UiElement

Bundled source example: crates/platinum-sdk/src/game/ui/launch.ui.xml

<panel id="530" x="674" y="225" width="500" height="372">
  <text id="531" x="28" y="24" width="444" height="38">CHOOSE A MAP</text>
  <button id="532" x="28" y="88" width="444" height="56" action="framework.select_map.island" selection-bind="selected_level" selection-value="island">Lighthouse Island</button>
  <button id="533" x="28" y="158" width="444" height="56" action="framework.select_map.training" selection-bind="selected_level" selection-value="training">Training Grounds</button>
  <text id="534" x="28" y="238" width="444" height="34">Map: {selected_level_name}</text>
  <text id="535" x="28" y="286" width="444" height="56" class="muted">{loading_status}</text>
 </panel>

Bundled source example: crates/platinum-sdk/src/game/ui/main_menu.ui.xml

<panel id="920" x="650" y="70" width="550" height="580">
    <text id="921" x="24" y="18" width="500" height="28">Player name</text>
    <input id="922" x="24" y="52" width="500" height="44" bind="player_name">Player</input>
    <text id="923" x="24" y="112" width="500" height="28">Shared P2P room link from the host</text>
    <input id="924" x="24" y="146" width="500" height="44" bind="server_endpoint" />
    <text id="925" x="24" y="206" width="500" height="28">Optional room secret</text>
    <input id="926" x="24" y="240" width="500" height="44" bind="room_code" />
    <text id="927" x="24" y="300" width="500" height="28">Dedicated server address</text>
    <input id="928" x="24" y="334" width="500" height="44" bind="dedicated_endpoint">ws://127.0.0.1:8091</input>
    <text id="929" x="24" y="394" width="500" height="28">P2P signaling service (advanced)</text>
    <input id="930" x="24" y="428" width="500" height="44" bind="signaling_endpoint">ws://127.0.0.1:8092/coastal-range</input>
    <text id="931" x="24" y="500" width="500" height="48">{connection_status}</text>
  </panel>

Source: crates/platinum-sdk/src/game/ui/document.rs:127

menu

<menu id="1" x="0" y="0" width="200" height="40">…</menu>

Container used by the bundled menu documents. Its children provide the interactive controls. Every element requires a unique exact u64 id. Shared geometry fields x/y default to 0; width defaults to 200 and height to 40. Dimensions must be finite and nonnegative. Renderer contracts are evidenced in crates/platinum-sdk/src/game/ui/runtime.rs. Activation records contain event, screen, element, action, value, player, tick and sequence. Only interactive controls generate activation records. Runtime callbacks and document access remain subject to host authority. Actual bundled examples follow where present; no example means source coverage is incomplete.

Public data fields
NameType / declarationDescription
idu64Required unique exact integer within this document.
x / yfinite number; optional px suffixPosition; defaults to 0 / 0.
width / heightfinite nonnegative number; optional px suffixDimensions; defaults to 200 / 40.
actionstringAuthored action identifier, copied to activation records; the host must authorize the action.
bindstringRuntime value key for text/value binding.
visible / disabled / visible-bindstring attributesVisibility/interaction gates read by the renderer; they do not replace authority checks.
Source-evidenced cross-language references
LuaEvent TableNative
engine.ui.get(document, id, property)
engine.ui.patch(document, id, properties)
UiDocument / UiElement

Bundled source example: crates/platinum-sdk/src/game/ui/default_pause.ui.xml

<menu id="100" x="430" y="200" width="420" height="320">
    <text id="101" x="30" y="28" width="360" height="52" font-size="34">Game paused</text>
    <button id="110" x="30" y="112" width="360" height="56" role="back" action="framework.resume">Resume</button>
    <button id="111" x="30" y="190" width="360" height="56" action="framework.settings">Settings</button>
  </menu>

Bundled source example: crates/platinum-sdk/src/game/ui/launch.ui.xml

<menu id="500" x="65" y="62" width="560" height="596">
  <text id="501" x="34" y="28" width="492" height="52" class="title">CREATE A GAME</text>
  <text id="502" x="34" y="88" width="492" height="32" class="muted">{launch_kind} · CHOOSE YOUR MODE</text>
  <button id="510" x="34" y="142" width="492" height="54" action="framework.select_mode.target_range" selection-bind="selected_mode" selection-value="target_range">Target range · practice and explore</button>
  <button id="511" x="34" y="208" width="492" height="54" action="framework.select_mode.free_for_all" selection-bind="selected_mode" selection-value="free_for_all">Free for all · every ranger for themselves</button>
  <button id="512" x="34" y="274" width="492" height="54" action="framework.select_mode.team_deathmatch" selection-bind="selected_mode" selection-value="team_deathmatch">Team deathmatch · Blue versus Red</button>
  <button id="513" x="34" y="340" width="492" height="54" action="framework.select_mode.capture_the_flag" selection-bind="selected_mode" selection-value="capture_the_flag">Capture the flag · attack and defend</button>
  <text id="514" x="34" y="414" width="492" height="32">Mode: {selected_mode_name}</text>
  <button id="515" x="34" y="480" width="320" height="60" class="primary" action="framework.start" visible-bind="launch_ready">Start game</button>
  <button id="516" x="370" y="480" width="156" height="60" action="framework.back">Back</button>
 </menu>
 

Source: crates/platinum-sdk/src/game/ui/document.rs:127

text

<text id="1" x="0" y="0" width="200" height="40">…</text>

Displays authored text. Named {key} placeholders are replaced from runtime values; empty authored text can display the bound value. Every element requires a unique exact u64 id. Shared geometry fields x/y default to 0; width defaults to 200 and height to 40. Dimensions must be finite and nonnegative. Renderer contracts are evidenced in crates/platinum-sdk/src/game/ui/runtime.rs. Activation records contain event, screen, element, action, value, player, tick and sequence. Only interactive controls generate activation records. Runtime callbacks and document access remain subject to host authority. Actual bundled examples follow where present; no example means source coverage is incomplete.

Public data fields
NameType / declarationDescription
idu64Required unique exact integer within this document.
x / yfinite number; optional px suffixPosition; defaults to 0 / 0.
width / heightfinite nonnegative number; optional px suffixDimensions; defaults to 200 / 40.
actionstringAuthored action identifier, copied to activation records; the host must authorize the action.
bindstringRuntime value key for text/value binding.
visible / disabled / visible-bindstring attributesVisibility/interaction gates read by the renderer; they do not replace authority checks.
Source-evidenced cross-language references
LuaEvent TableNative
engine.ui.get(document, id, property)
engine.ui.patch(document, id, properties)
UiDocument / UiElement

Bundled source example: crates/platinum-sdk/src/game/ui/default_hud.ui.xml

<text id="1" x="620" y="338" width="40" height="40" font-size="28" color="#ffffff">+</text>
  

Bundled source example: crates/platinum-sdk/src/game/ui/default_pause.ui.xml

<text id="101" x="30" y="28" width="360" height="52" font-size="34">Game paused</text>
    

Source: crates/platinum-sdk/src/game/ui/document.rs:127

button

<button id="1" x="0" y="0" width="200" height="40">…</button>

Activates the named action when interactive. Produces ui.clicked through UiActionQueue. Every element requires a unique exact u64 id. Shared geometry fields x/y default to 0; width defaults to 200 and height to 40. Dimensions must be finite and nonnegative. Renderer contracts are evidenced in crates/platinum-sdk/src/game/ui/runtime.rs. Activation records contain event, screen, element, action, value, player, tick and sequence. Only interactive controls generate activation records. Runtime callbacks and document access remain subject to host authority. Actual bundled examples follow where present; no example means source coverage is incomplete.

Public data fields
NameType / declarationDescription
idu64Required unique exact integer within this document.
x / yfinite number; optional px suffixPosition; defaults to 0 / 0.
width / heightfinite nonnegative number; optional px suffixDimensions; defaults to 200 / 40.
actionstringAuthored action identifier, copied to activation records; the host must authorize the action.
bindstringRuntime value key for text/value binding.
visible / disabled / visible-bindstring attributesVisibility/interaction gates read by the renderer; they do not replace authority checks.
Source-evidenced cross-language references
LuaEvent TableNative
engine.ui.get(document, id, property)
engine.ui.patch(document, id, properties)
UiDocument / UiElement

Bundled source example: crates/platinum-sdk/src/game/ui/default_hud.ui.xml

<button id="11" x="340" y="635" width="110" height="60" action="framework.equip.1">1 · {slot_1}</button>
  

Bundled source example: crates/platinum-sdk/src/game/ui/default_pause.ui.xml

<button id="110" x="30" y="112" width="360" height="56" role="back" action="framework.resume">Resume</button>
    

Source: crates/platinum-sdk/src/game/ui/document.rs:127

image

<image id="1" x="0" y="0" width="200" height="40">…</image>

Loads the asset named by src into an ImageNode. Asset loading is host-controlled. Every element requires a unique exact u64 id. Shared geometry fields x/y default to 0; width defaults to 200 and height to 40. Dimensions must be finite and nonnegative. Renderer contracts are evidenced in crates/platinum-sdk/src/game/ui/runtime.rs. Activation records contain event, screen, element, action, value, player, tick and sequence. Only interactive controls generate activation records. Runtime callbacks and document access remain subject to host authority. Actual bundled examples follow where present; no example means source coverage is incomplete.

Public data fields
NameType / declarationDescription
idu64Required unique exact integer within this document.
x / yfinite number; optional px suffixPosition; defaults to 0 / 0.
width / heightfinite nonnegative number; optional px suffixDimensions; defaults to 200 / 40.
actionstringAuthored action identifier, copied to activation records; the host must authorize the action.
bindstringRuntime value key for text/value binding.
visible / disabled / visible-bindstring attributesVisibility/interaction gates read by the renderer; they do not replace authority checks.
srcasset pathImage asset to load.
Source-evidenced cross-language references
LuaEvent TableNative
engine.ui.get(document, id, property)
engine.ui.patch(document, id, properties)
UiDocument / UiElement

Source: crates/platinum-sdk/src/game/ui/document.rs:127

progress

<progress id="1" x="0" y="0" width="200" height="40">…</progress>

Displays a fill whose width is the bound numeric value clamped to 0..1; the missing-value fallback is 1. Every element requires a unique exact u64 id. Shared geometry fields x/y default to 0; width defaults to 200 and height to 40. Dimensions must be finite and nonnegative. Renderer contracts are evidenced in crates/platinum-sdk/src/game/ui/runtime.rs. Activation records contain event, screen, element, action, value, player, tick and sequence. Only interactive controls generate activation records. Runtime callbacks and document access remain subject to host authority. Actual bundled examples follow where present; no example means source coverage is incomplete.

Public data fields
NameType / declarationDescription
idu64Required unique exact integer within this document.
x / yfinite number; optional px suffixPosition; defaults to 0 / 0.
width / heightfinite nonnegative number; optional px suffixDimensions; defaults to 200 / 40.
actionstringAuthored action identifier, copied to activation records; the host must authorize the action.
bindstringRuntime value key for text/value binding.
visible / disabled / visible-bindstring attributesVisibility/interaction gates read by the renderer; they do not replace authority checks.
colorcolor stringFill color, resolved through styles.
Source-evidenced cross-language references
LuaEvent TableNative
engine.ui.get(document, id, property)
engine.ui.patch(document, id, properties)
UiDocument / UiElement

Bundled source example: crates/platinum-sdk/src/game/ui/default_hud.ui.xml

<progress id="2" x="30" y="650" width="220" height="12" bind="health_fraction" />
  

Source: crates/platinum-sdk/src/game/ui/document.rs:127

toggle

<toggle id="1" x="0" y="0" width="200" height="40">…</toggle>

On activation, flips the bound string between true and false. Produces ui.value_changed. Every element requires a unique exact u64 id. Shared geometry fields x/y default to 0; width defaults to 200 and height to 40. Dimensions must be finite and nonnegative. Renderer contracts are evidenced in crates/platinum-sdk/src/game/ui/runtime.rs. Activation records contain event, screen, element, action, value, player, tick and sequence. Only interactive controls generate activation records. Runtime callbacks and document access remain subject to host authority. Actual bundled examples follow where present; no example means source coverage is incomplete.

Public data fields
NameType / declarationDescription
idu64Required unique exact integer within this document.
x / yfinite number; optional px suffixPosition; defaults to 0 / 0.
width / heightfinite nonnegative number; optional px suffixDimensions; defaults to 200 / 40.
actionstringAuthored action identifier, copied to activation records; the host must authorize the action.
bindstringRuntime value key for text/value binding.
visible / disabled / visible-bindstring attributesVisibility/interaction gates read by the renderer; they do not replace authority checks.
Source-evidenced cross-language references
LuaEvent TableNative
engine.ui.get(document, id, property)
engine.ui.patch(document, id, properties)
UiDocument / UiElement

Bundled source example: crates/platinum-sdk/src/game/ui/settings.ui.xml

<toggle id="811" x="30" y="214" width="420" height="48" bind="muted" action="framework.mute">Mute · {muted}</toggle>
    

Source: crates/platinum-sdk/src/game/ui/document.rs:127

slider

<slider id="1" x="0" y="0" width="200" height="40">…</slider>

Changes its bound numeric value using min/max and pointer or directional input. Produces ui.value_changed. Every element requires a unique exact u64 id. Shared geometry fields x/y default to 0; width defaults to 200 and height to 40. Dimensions must be finite and nonnegative. Renderer contracts are evidenced in crates/platinum-sdk/src/game/ui/runtime.rs. Activation records contain event, screen, element, action, value, player, tick and sequence. Only interactive controls generate activation records. Runtime callbacks and document access remain subject to host authority. Actual bundled examples follow where present; no example means source coverage is incomplete.

Public data fields
NameType / declarationDescription
idu64Required unique exact integer within this document.
x / yfinite number; optional px suffixPosition; defaults to 0 / 0.
width / heightfinite nonnegative number; optional px suffixDimensions; defaults to 200 / 40.
actionstringAuthored action identifier, copied to activation records; the host must authorize the action.
bindstringRuntime value key for text/value binding.
visible / disabled / visible-bindstring attributesVisibility/interaction gates read by the renderer; they do not replace authority checks.
min / maxfinite numeric stringsNumeric range read by slider interaction.
Source-evidenced cross-language references
LuaEvent TableNative
engine.ui.get(document, id, property)
engine.ui.patch(document, id, properties)
UiDocument / UiElement

Bundled source example: crates/platinum-sdk/src/game/ui/settings.ui.xml

<slider id="810" x="30" y="152" width="420" height="42" min="0" max="1" bind="master_volume" action="framework.volume" />
    

Source: crates/platinum-sdk/src/game/ui/document.rs:127

input

<input id="1" x="0" y="0" width="200" height="40">…</input>

Editable text input, initialized from bind or authored text. Current renderer limits editable input to 256 characters. Produces ui.value_changed. Every element requires a unique exact u64 id. Shared geometry fields x/y default to 0; width defaults to 200 and height to 40. Dimensions must be finite and nonnegative. Renderer contracts are evidenced in crates/platinum-sdk/src/game/ui/runtime.rs. Activation records contain event, screen, element, action, value, player, tick and sequence. Only interactive controls generate activation records. Runtime callbacks and document access remain subject to host authority. Actual bundled examples follow where present; no example means source coverage is incomplete.

Public data fields
NameType / declarationDescription
idu64Required unique exact integer within this document.
x / yfinite number; optional px suffixPosition; defaults to 0 / 0.
width / heightfinite nonnegative number; optional px suffixDimensions; defaults to 200 / 40.
actionstringAuthored action identifier, copied to activation records; the host must authorize the action.
bindstringRuntime value key for text/value binding.
visible / disabled / visible-bindstring attributesVisibility/interaction gates read by the renderer; they do not replace authority checks.
fontasset pathOptional font asset.
Source-evidenced cross-language references
LuaEvent TableNative
engine.ui.get(document, id, property)
engine.ui.patch(document, id, properties)
UiDocument / UiElement

Bundled source example: crates/platinum-sdk/src/game/ui/lobby.ui.xml

<input id="954" x="32" y="180" width="696" height="44" bind="server_endpoint" />
    

Bundled source example: crates/platinum-sdk/src/game/ui/main_menu.ui.xml

<input id="922" x="24" y="52" width="500" height="44" bind="player_name">Player</input>
    

Source: crates/platinum-sdk/src/game/ui/document.rs:127

scroll

<scroll id="1" x="0" y="0" width="200" height="40">…</scroll>

Vertical scroll container, with wheel movement bounded by content size. Every element requires a unique exact u64 id. Shared geometry fields x/y default to 0; width defaults to 200 and height to 40. Dimensions must be finite and nonnegative. Renderer contracts are evidenced in crates/platinum-sdk/src/game/ui/runtime.rs. Activation records contain event, screen, element, action, value, player, tick and sequence. Only interactive controls generate activation records. Runtime callbacks and document access remain subject to host authority. Actual bundled examples follow where present; no example means source coverage is incomplete.

Public data fields
NameType / declarationDescription
idu64Required unique exact integer within this document.
x / yfinite number; optional px suffixPosition; defaults to 0 / 0.
width / heightfinite nonnegative number; optional px suffixDimensions; defaults to 200 / 40.
actionstringAuthored action identifier, copied to activation records; the host must authorize the action.
bindstringRuntime value key for text/value binding.
visible / disabled / visible-bindstring attributesVisibility/interaction gates read by the renderer; they do not replace authority checks.
Source-evidenced cross-language references
LuaEvent TableNative
engine.ui.get(document, id, property)
engine.ui.patch(document, id, properties)
UiDocument / UiElement

Source: crates/platinum-sdk/src/game/ui/document.rs:127

list

<list id="1" x="0" y="0" width="200" height="40">…</list>

Validated generic container tag. No automatic item-template or data-source materialization contract is inferred by this generator. Every element requires a unique exact u64 id. Shared geometry fields x/y default to 0; width defaults to 200 and height to 40. Dimensions must be finite and nonnegative. Renderer contracts are evidenced in crates/platinum-sdk/src/game/ui/runtime.rs. Activation records contain event, screen, element, action, value, player, tick and sequence. Only interactive controls generate activation records. Runtime callbacks and document access remain subject to host authority. Actual bundled examples follow where present; no example means source coverage is incomplete.

Public data fields
NameType / declarationDescription
idu64Required unique exact integer within this document.
x / yfinite number; optional px suffixPosition; defaults to 0 / 0.
width / heightfinite nonnegative number; optional px suffixDimensions; defaults to 200 / 40.
actionstringAuthored action identifier, copied to activation records; the host must authorize the action.
bindstringRuntime value key for text/value binding.
visible / disabled / visible-bindstring attributesVisibility/interaction gates read by the renderer; they do not replace authority checks.
Source-evidenced cross-language references
LuaEvent TableNative
engine.ui.get(document, id, property)
engine.ui.patch(document, id, properties)
UiDocument / UiElement

Source: crates/platinum-sdk/src/game/ui/document.rs:127