This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tools:dialog_creator_documentation [2026/07/23 12:39] – rock | tools:dialog_creator_documentation [2026/07/23 15:55] (current) – rock | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Tutorial: Animated Button ===== | + | ====== Arma 3 Dialog Creator User Guide ====== |
| + | |||
| + | ===== What This Tool Creates ===== | ||
| + | |||
| + | Arma 3 Dialog Creator builds config-ready HPP for two related UI surfaces: | ||
| + | |||
| + | * **Dialog UI:** interactive displays with buttons, edit boxes, listboxes, dropdowns, map controls, panels, and apply/ | ||
| + | * **HUD / Turret Optics:** overlay-style resources for reticles, range ladders, sensor/ | ||
| + | |||
| + | The tool creates the static display structure. Your addon still owns the runtime behavior: SQF population, validation, multiplayer authority, object selection, and gameplay changes. | ||
| + | |||
| + | ===== The Core Idea ===== | ||
| + | |||
| + | An Arma UI normally has two layers of work: | ||
| + | |||
| + | * **HPP/ | ||
| + | * **SQF:** fills controls with live data, reacts to clicks, validates input, and applies changes. | ||
| + | |||
| + | This tool helps with the first layer and gives notes for the second. It cannot prove that your addon include path, inherited base classes, texture paths, or SQF functions exist. That still needs addon-side validation and in-game testing. | ||
| + | |||
| + | ===== Quick Start With Reasons ===== | ||
| + | |||
| + | - Open [[http:// | ||
| + | * **Why:** the tool is file-backed and runs in the browser. There is no database or install step. | ||
| + | - Choose '' | ||
| + | * **Dialog UI** means the player interacts with controls: buttons, lists, edit boxes, maps, checkboxes. | ||
| + | * **HUD / Turret Optics** means the UI is mostly an overlay: reticle, range ladder, headings, lock state, sensor state. | ||
| + | * **Why:** the chosen mode changes the defaults, wizards, and export assumptions. | ||
| + | - Fill in the left setup panel before building. | ||
| + | * **Why:** class names, IDD, IDC ranges, and namespace keys are the contract between config and SQF. Changing them late can break scripts that already reference them. | ||
| + | - Add controls with the palette or guided wizards. | ||
| + | * **Palette: | ||
| + | * **Workflow wizards:** use when you want a complete pattern with related controls and notes. | ||
| + | - Place controls visually, then refine in the inspector. | ||
| + | * **Why:** dragging is fast for rough layout, but exact X/Y/W/H values are better for repeatable addon work. | ||
| + | - Export HPP and include it from your addon config. | ||
| + | * **Why:** Arma reads displays from config. The exported HPP is not active until included by a real addon or mission config. | ||
| + | - Implement or connect the generated SQF function names. | ||
| + | * **Why:** button '' | ||
| + | - Test in game and read the RPT. | ||
| + | * **Why:** browser preview can catch layout mistakes, but only Arma can confirm inherited classes, safezone behavior, texture loading, control events, and script errors. | ||
| + | |||
| + | ===== Setup Fields: What They Mean ===== | ||
| + | |||
| + | ==== Class ==== | ||
| + | |||
| + | The top-level display or resource class name in the generated HPP. | ||
| + | |||
| + | **Why it matters:** this is how the display is opened or referenced from config. Keep it stable and unique, usually with your addon tag or prefix. | ||
| + | |||
| + | ==== IDD ==== | ||
| + | |||
| + | The display ID. | ||
| + | |||
| + | **Why it matters:** Arma uses IDD values to identify displays. Collisions with other displays can make scripts target the wrong display or fail unpredictably. | ||
| + | |||
| + | ==== Namespace key ==== | ||
| + | |||
| + | The '' | ||
| + | |||
| + | **Why it matters:** '' | ||
| + | |||
| + | ==== IDC start ==== | ||
| + | |||
| + | The first positive control ID used for interactive controls. | ||
| + | |||
| + | **Why it matters:** SQF finds controls with '' | ||
| + | |||
| + | ==== Surface ==== | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | **Why it matters:** overlays use different lifecycle expectations from interactive dialogs. A turret optic/ | ||
| + | |||
| + | ==== Canvas ratio ==== | ||
| + | |||
| + | The browser preview aspect ratio. | ||
| + | |||
| + | **Why it matters:** Arma users may run 16:9, 16:10, 21:9, or windowed layouts. A panel that looks correct at one ratio can overlap or drift at another. | ||
| + | |||
| + | ==== Safezone output ==== | ||
| + | |||
| + | Exports positions as safezone-relative expressions. | ||
| + | |||
| + | **Why it matters:** safezone output adapts to UI scaling and aspect ratio better than raw screen constants. It still needs in-game testing. | ||
| + | |||
| + | ==== Export defines ==== | ||
| + | |||
| + | Generates ''# | ||
| + | |||
| + | **Why it matters:** named constants are safer than scattered numeric literals. They make SQF and config easier to audit. | ||
| + | |||
| + | ==== Snap to grid and Grid step ==== | ||
| + | |||
| + | Controls placement increments when moving, resizing, and keyboard nudging. | ||
| + | |||
| + | **Why it matters:** consistent grid values produce cleaner HPP and reduce near-miss alignment issues. | ||
| + | |||
| + | ===== Canvas: How To Use It ===== | ||
| + | |||
| + | * **Add:** click a control type in the left palette. | ||
| + | * **Select:** click a control or its layer entry. | ||
| + | * **Move:** drag the control. | ||
| + | * **Resize:** drag the bottom-right handle. | ||
| + | * **Duplicate: | ||
| + | * **Delete:** removes the selected control. | ||
| + | * **Reorder: | ||
| + | * **Lock:** prevents accidental mouse movement/ | ||
| + | * **Hide:** visually dims the control in the editor but keeps it in the project/ | ||
| + | * **Zoom:** use mouse wheel or the '' | ||
| + | * **Pan:** drag empty canvas space. | ||
| + | * **Reset view:** click '' | ||
| + | |||
| + | **Why zoom/pan does not affect export:** the tool transforms only the browser preview. The actual control coordinates remain normalized 0..1 layout values. | ||
| + | |||
| + | ===== Inspector Fields: What They Mean ===== | ||
| + | |||
| + | * **Class:** the generated control class name. Use stable, readable names. | ||
| + | * **Base class:** the inherited Arma control class, such as '' | ||
| + | * **IDC:** positive value for controls accessed by SQF; '' | ||
| + | * **Text / texture:** visible text for text/ | ||
| + | * **X/ | ||
| + | * **Style:** numeric Arma style flags. Use only when you know the base class expects them. | ||
| + | * **sizeEx:** text size. Browser preview is approximate; | ||
| + | * **Font:** Arma font class. | ||
| + | * **colorText[]: | ||
| + | * **colorBackground[]: | ||
| + | * **Tooltip: | ||
| + | * **Action:** button action string. | ||
| + | * **Background control:** places the control in '' | ||
| + | * **Visible: | ||
| + | * **Locked:** prevents mouse move/ | ||
| + | |||
| + | String fields commit when you leave the box or press Enter. This avoids redrawing picture/ | ||
| + | |||
| + | ===== Image Preview ===== | ||
| + | |||
| + | '' | ||
| + | |||
| + | - Select an '' | ||
| + | - Set '' | ||
| + | - Use '' | ||
| + | - Use the preview to align and size the image. | ||
| + | |||
| + | **Why preview is separate from texture path:** Arma commonly uses '' | ||
| + | |||
| + | The preview file is not uploaded, not written to HPP, and not saved into project JSON. | ||
| + | |||
| + | ====== Tutorial | ||
| + | |||
| + | ===== Background Image ===== | ||
| + | |||
| + | **Goal:** create a non-interactive picture or panel behind the rest of the dialog. | ||
| + | |||
| + | - Choose '' | ||
| + | * **Why:** a dialog background normally belongs to an interactive display, not a HUD overlay. | ||
| + | - Open '' | ||
| + | * **What this creates:** an '' | ||
| + | - Enter a class name such as '' | ||
| + | * **Why:** class names should explain purpose. This helps when reading exported HPP later. | ||
| + | - Enter the Arma texture path, for example '' | ||
| + | * **What this means:** this becomes '' | ||
| + | * **Common mistake:** using a Windows path like '' | ||
| + | - Set X/Y/W/H. | ||
| + | * **Why:** these values define where the picture sits in normalized display space. | ||
| + | * **Tip:** use a broad backing image first, then add smaller frames or labels above it. | ||
| + | - Create the control. | ||
| + | * **What happens:** it appears on the canvas and is exported in '' | ||
| + | - Optional: choose a local PNG/JPG/TGA preview. | ||
| + | * **Why:** preview helps align the image without requiring the browser to read '' | ||
| + | - Keep '' | ||
| + | * **Why:** static art does not need a positive IDC. Saving positive IDCs for live controls keeps SQF lookup clean. | ||
| + | |||
| + | ===== Button With Action ===== | ||
| + | |||
| + | **Goal:** add a button that calls SQF when clicked. | ||
| + | |||
| + | - Choose '' | ||
| + | * **What this creates:** an '' | ||
| + | - Give it a short visible label such as '' | ||
| + | * **Why:** buttons should use short verbs. Longer explanations belong in tooltips or nearby text. | ||
| + | - Set a tooltip. | ||
| + | * **Why:** tooltips explain the consequence without making the button large. | ||
| + | - Use a short action string such as '' | ||
| + | * **What this means:** the UI passes a command key and Arma event arguments to a function. | ||
| + | * **Why:** short event strings are easier to debug than large inline SQF blocks. | ||
| + | - Give the button a positive IDC. | ||
| + | * **Why:** interactive controls may need lookup, enable/ | ||
| + | - Implement the called function in your addon. | ||
| + | * **Common mistake:** exporting a button that calls '' | ||
| + | - Validate before changing gameplay state. | ||
| + | * **Why:** dialog code runs locally. Multiplayer-sensitive actions need locality/ | ||
| + | |||
| + | ===== Animated Button ===== | ||
| **Goal:** make a button visibly react to hover. | **Goal:** make a button visibly react to hover. | ||
| + | |||
| - Choose '' | - Choose '' | ||
| * **What this creates:** a button with mouse-enter/ | * **What this creates:** a button with mouse-enter/ | ||
| Line 9: | Line 205: | ||
| - Test the result in Arma. | - Test the result in Arma. | ||
| * **Why:** inherited control classes, parent display behavior, and UI scale can change how fade/commit appears. | * **Why:** inherited control classes, parent display behavior, and UI scale can change how fade/commit appears. | ||
| - | ===== Tutorial: | + | |
| + | ===== Dropdown With Options ===== | ||
| **Goal:** let the user choose one value from a controlled list. | **Goal:** let the user choose one value from a controlled list. | ||
| + | |||
| - Choose '' | - Choose '' | ||
| * **What this creates:** an '' | * **What this creates:** an '' | ||
| Line 24: | Line 223: | ||
| - Read selected data on Apply. | - Read selected data on Apply. | ||
| * **Why:** reading only the visible text can break if labels change. | * **Why:** reading only the visible text can break if labels change. | ||
| - | ===== Tutorial: | + | |
| + | ===== Apply / Reset / Cancel Dialog ===== | ||
| **Goal:** build a predictable dialog where the user can edit values safely before committing them. | **Goal:** build a predictable dialog where the user can edit values safely before committing them. | ||
| + | |||
| - Create a panel layout. | - Create a panel layout. | ||
| * **Why:** a stable frame/ | * **Why:** a stable frame/ | ||
| Line 43: | Line 245: | ||
| - Apply changes only after validation succeeds. | - Apply changes only after validation succeeds. | ||
| * **Why:** users should not partially mutate gameplay state by simply typing into fields. | * **Why:** users should not partially mutate gameplay state by simply typing into fields. | ||
| - | ===== Tutorial: | + | |
| + | ===== Map Selector ===== | ||
| **Goal:** let the user choose a world position from a map control. | **Goal:** let the user choose a world position from a map control. | ||
| + | |||
| - Choose '' | - Choose '' | ||
| * **What this creates:** a map control plus supporting controls for the selected output. | * **What this creates:** a map control plus supporting controls for the selected output. | ||
| Line 55: | Line 260: | ||
| - Validate the selected position. | - Validate the selected position. | ||
| * **Why:** spawning, teleporting, | * **Why:** spawning, teleporting, | ||
| - | ===== Tutorial: | + | |
| + | ===== HUD / Turret Optics Overlay ===== | ||
| **Goal:** create a readable overlay for a gunner, camera, sensor, or turret view. | **Goal:** create a readable overlay for a gunner, camera, sensor, or turret view. | ||
| + | |||
| - Choose '' | - Choose '' | ||
| * **Why:** this mode assumes overlay behavior and '' | * **Why:** this mode assumes overlay behavior and '' | ||
| Line 69: | Line 277: | ||
| - Test in the target vehicle/ | - Test in the target vehicle/ | ||
| * **Why:** browser preview cannot reproduce FOV, camera shake, optics post-processing, | * **Why:** browser preview cannot reproduce FOV, camera shake, optics post-processing, | ||
| - | ===== Export And Addon Integration ===== | + | |
| + | ==== Export And Addon Integration ==== | ||
| - Copy or download the generated HPP. | - Copy or download the generated HPP. | ||
| - Include it from your addon '' | - Include it from your addon '' | ||
| Line 80: | Line 290: | ||
| - Open the display in game. | - Open the display in game. | ||
| - Review the RPT for config and script errors. | - Review the RPT for config and script errors. | ||
| - | ===== Common Problems ===== | + | |
| + | ==== Common Problems ==== | ||
| * **The display opens but buttons do nothing:** the action function probably is not registered or the event string points at the wrong tag/ | * **The display opens but buttons do nothing:** the action function probably is not registered or the event string points at the wrong tag/ | ||
| * **A control cannot be found by SQF:** it may have '' | * **A control cannot be found by SQF:** it may have '' | ||
| Line 87: | Line 299: | ||
| * **Dropdown labels work but behavior is wrong:** SQF may be reading visible text instead of stable row data. | * **Dropdown labels work but behavior is wrong:** SQF may be reading visible text instead of stable row data. | ||
| * **Multiplayer action works locally but not for other players:** the button runs on the local client and needs a validated remote/ | * **Multiplayer action works locally but not for other players:** the button runs on the local client and needs a validated remote/ | ||
| - | ===== Pre-Pack Checklist ===== | + | |
| + | ==== Pre-Pack Checklist ==== | ||
| * Display class is included from the intended config root. | * Display class is included from the intended config root. | ||
| * IDD does not collide with another display. | * IDD does not collide with another display. | ||
| Line 99: | Line 313: | ||
| * Layout is checked at 16:9, 16:10, 21:9, and narrow windowed ratios. | * Layout is checked at 16:9, 16:10, 21:9, and narrow windowed ratios. | ||
| * MP-sensitive actions validate locality and authority outside the UI layer. | * MP-sensitive actions validate locality and authority outside the UI layer. | ||
| + | |||
| + | |||