UI Style Guide · Components
Sliders & Range Controls
Sliders let users adjust continuous values (volume, brightness). Soviet-functional style uses minimal visual noise — a simple track and highlighted grab area.
Anatomy
Key features
- Track: 4 px height, light tint
rgba(255,255,255,.08), rounded caps - Fill: ARC Cyan
#4AC1F2, shows progress from left to right - Grabber circle: 14 px diameter, cyan, centered on the fill. Includes subtle shadow ring
rgba(74,193,242,.15)for depth. Cursor changes tograbon hover. - Label + value: 9/10 px text, label on left, value (%) on right in monospace
- Theme resource:
slider_volume.tres(HSlider node)
Usage rules
- Always show the current value. Display as percentage or absolute number (0–100) in monospace to the right of the track.
- Use only in settings panels. Sliders are for configurations the player tweaks once. Not for in-game control (building power, research allocation, etc.) — use buttons or direct input for those.
- Label at 10 px, uppercase. "Master Volume", "Music Volume", "Effects Volume" — same style as other setting labels.
- Pair with a label. Never display a slider without identifying what it controls.
- Maintain consistent width. All sliders in settings are full-width within their container (typically 240 px in a settings panel).
Toggles & Checkboxes
Two toggle styles for in-game use: inline toggle switches (minimal) for settings rows, and checkbox buttons (CheckButton theme) for tab-like selection within panels.
Toggle switch (settings row)
Toggle switch anatomy
- Container: 36 px wide × 20 px tall, rounded pill (border-radius 10 px)
- Off state: Slate background
#2A2F37, gray knob on left - On state: Cyan tint
rgba(74,193,242,.2), cyan knob on right - Knob: 14 px circle, smooth 100ms transition on toggle
- Theme: HTML toggle via
.stg-toggle+.stg-pill(CSS-based)
Checkbox button (tab-like selection)
CheckButton usage (Godot)
- Node type:
CheckButton(built-in Godot control) - Theme:
button_toggle.tresapplies to the entire button - Inactive: Dust Shadow text, no background
- Active (pressed): Cyan text + light cyan background, subtle rounded corners
- Font: Onest-Bold 10 px, uppercase with 0.07 em letter-spacing
- Spacing: Arrange in a horizontal row inside a VBox with 2–3 px padding + background tint
When to use each toggle type
| Type | Theme | Best for | Avoid |
|---|---|---|---|
| Toggle switch | .stg-toggle (CSS) |
Binary on/off settings in settings panel. One-line config rows with label + toggle. | In-game controls, mission log tabs, building mode selection — use CheckButton instead. |
| CheckButton (toggle) | button_toggle.tres |
Multi-option tab selection: Mission Log tabs (All / Active / Complete), Building list filters, Mode selection. | Settings toggles — use toggle switch. Use as a decorative check icon — use icon font instead. |
button_toggle.tres can be used for exclusive selection (mission tabs) but the visual does not distinguish exclusivity. If users need to toggle between three options and only one can be active, document this behavior in code comments or preserve the state on close.Tab Buttons & Segmented Selection
Tab-like controls appear in mission log, building list filters, and mode selection. Use CheckButton with button_toggle.tres arranged horizontally, or apply .mission-tabs CSS class for web.
Visual anatomy
Visual breakdown
- Container: Subtle background tint
rgba(255,255,255,.03), 4 px border-radius, 3 px padding inside - Inactive tab: Dust Shadow text
#8A8A7A, transparent background, 3 px corner radius - Active tab: Cyan text
#4AC1F2, 10% cyan tint background, smooth color transition (120 ms) - Font: Onest-Bold 10 px, uppercase, 0.07 em letter-spacing
- Gap between tabs: 2 px (creates visual separation without borders)
Godot implementation
HBoxContainer with spacing set to 2 px. Add CheckButton children with theme button_toggle.tres. Use group property (without radio exclusivity) to manage visibility of content panels tied to each tab. Connect toggled(bool) signal to tab switching logic.
Usage guidelines
- Use when space is limited. Tabs pack 3–4 filter/mode options into one row. Prefer tabs over a dropdown for < 5 options visible at once.
- Label each tab clearly. "ALL", "ACTIVE", "COMPLETE" (mission log) or "FILTER_A", "FILTER_B" (building list). Keep labels short (≤ 10 chars).
- Only one tab active at a time. Use code logic to enforce mutual exclusion, not Godot's RadioButton (which has different styling).
- Align above the content they filter. Tabs sit at the top of a panel. Content below changes when user clicks a different tab.
- Keyboard navigation: Tab key cycles tabs. Bind arrow keys (← / →) to switch tabs if needed.
button_toggle.tres for a single on/off action. For binary toggles, use a toggle switch (.stg-toggle). Tabs are always grouped in a container with multiple options.Panel Anatomy
All panels share the same three-layer structure. Padding and separation values differ between modal (full-attention) and compact (in-game) contexts.
Modal / menu
Padding: 20 px · Sep: 12 px
In-game panel (compact)
Padding: 12 px · Sep: 6–8 px
Detail panel philosophy — quick overview, main tasks first
A player opening a detail panel is scanning, not reading. The panel must answer three questions instantly:
- 1. What is this? — Name + icon in the header. Prominent, always visible.
- 2. Is there a problem? — Alert banner, status colour, warning text. Surfaces urgency before anything else.
- 3. What can I do? — One primary action button, immediately visible without scrolling.
Everything else (stats, assignments, secondary info) fills the rest of the panel in descending priority. All action buttons in detail panels use btn-xs (24px) — never btn-sm or larger. Use btn-secondary for the main action and btn-ghost for dismissive ones; the data should draw the eye, not the buttons.
Progress Bars
Height: 4 px · Radius: 2 px · Track: rgba(255,255,255,.08)