Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

dialog-xml

FreeNo executable scriptsNot checked

Explains how XML dialogs are used, covering file layout, coordinate rules, widget attributes, command bindings, and GUI color/font theming.

container32by container32161 installs in other catalogs

About this skill

XML Dialog

FlightGear draws its menubar and dialog boxes with PUI (or Canvas plus a compatibility layer in 2024.2 and later), reading PropertyList XML from $FG_ROOT/gui/. A dialog becomes reachable when a menubar item fires dialog-show with the dialog's <name>. Everything below is the practical subset you need to create, wire up, and restyle those files.

Minimal dialog skeleton

<PropertyList>
  <name>hello</name>
  <width>150</width>
  <height>100</height>
  <modal>false</modal>
  <draggable>true</draggable>
  <resizable>true</resizable>

  <text>
    <x>10</x>
    <y>50</y>
    <label>Hello, world</label>
  </text>

  <button>
    <x>40</x>
    <y>10</y>
    <legend>Close</legend>
    <binding>
      <command>dialog-close</command>
    </binding>
  </button>
</PropertyList>

The root element is always PropertyList; the dialog's name lives in a child element, not an attribute.

Coordinates

PUI treats the screen as a fixed 1024×768 canvas regardless of actual resolution. Values are pseudo-pixels.

  • Origin is the bottom-left corner of the screen, parent dialog, or enclosing group.
  • x grows left → right; y grows bottom → top.
  • Omitted x/y center the object.
  • Omitted width/height inherit the parent container's size. (The upstream doc says "width" for the height default — that is a typo; read it as height.)

Attributes shared by most objects

Attribute Meaning
x, y Bottom-left position in pseudo-pixels
width, height Object size in pseudo-pixels
border Border thickness; default 2
color Subgroup: red, green, blue, alpha
font Subgroup: name (no .txf), size, slant — size/slant apply to texture fonts only
legend Text drawn on the widget itself (e.g. button face)
label Text drawn near the widget
property Property-tree path bound to the widget's value
binding One or more command bindings fired on activation
keynum Raw key code that triggers the widget (e.g. 97 for a)
key Character or symbolic key name ("a", "Shift-A", "Tab", "F1", "PageDn"); escape <, >, & as &lt;, &gt;, &amp;
default true makes this the object activated by Return
visible false hides the widget and its children with no reserved space

Widget catalog

dialog

Top-level container. Required <name>. Extra keys: modal (default false), draggable (default true), resizable (default false), and a nasal block with open/close scripts. Nasal runs in a dialog namespace; settimer() and setlistener() set in open must be torn down in close if they should not outlive the dialog.

group / frame

group is an invisible layout container — children position themselves relative to it. frame is the same but draws a border and adjustable background. Use them to move blocks of widgets together.

input

Editable single-line text field. Bind with property; the value is read and written through that node.

text

Read-only label. Add format (printf-style) plus property to display a live value, e.g. <format>%-0.4f m</format>. A <label> is still useful as a width placeholder when the property is empty.

checkbox

Two-state control; binds a boolean property.

button

Push button. one-shot (default true) controls whether it pops back up. Attach one or more bindings; dialog-apply and dialog-close are the usual pair. Mark <default>true</default> for Return activation.

combo

Drop-down of fixed choices. Each option is a <value> element; bind the selection to property.

list

Scrollable list box with a right-side slider. Same <value> children as combo; updates property to the selected entry. On dialog-update it re-scans the value nodes.

airport-list

Auto-populated list of every airport FlightGear knows. property acts as a search term on dialog-update; the selected ICAO goes back into property on dialog-apply.

property-list

Navigable view of the global property tree. Fires bindings on selection and returns the selected path in property on apply. It only shows values — it does not set them. Held-modifier shortcuts: Ctrl+. toggles verbose mode, Ctrl+.. jumps to root, Ctrl+click on a bool toggles it, Shift+. dumps that tree level to the terminal. Printed flags mean r/w read/write protected, R/W traced, A/U archive/user-archive, P preserved on reset, T tied, Ln listener count.

select

Box with arrow buttons cycling through fixed <value> entries, bound to property.

slider

Horizontal by default; set vertical to true for a column. min (0.0) and max (1.0) set the range; step and pagestep enable discrete movement; fraction sizes the handle (0..1).

dial

Circular direction picker. min/max (0.0/1.0) and wrap (default true) shape the behavior; typical use is a 0–360 heading bound to a property.

textbox

Multi

Full SKILL.md on ClawHub

Install dialog-xml in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

FAQ

What does the dialog-xml skill do?

Explains how XML dialogs are used, covering file layout, coordinate rules, widget attributes, command bindings, and GUI color/font theming.

How do I install the dialog-xml skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the dialog-xml skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare dialog-xml with