Cover every control state
Style the hover, pressed, disabled and selected states of each control family, in the menus and in the gameplay HUD.
Each control draws a different surface per state: normal, hover, pressed, disabled, selected. Review them together whenever you restyle a control, in the menus and in the gameplay HUD.
The worked example
Each state derives from the normal button with base, so a change to Button
carries through and each state changes only what marks it:
[surfaces.ButtonHover]
base = "Button"
border = "@AccentCyan"
[surfaces.ButtonDisabled]
base = "Button"
fill = "#171e20"
border = "#64717360"
Surface families
Changing only the normal button creates an inconsistent theme. Review these families together; a theme can inherit states it does not need to override.
| Area | Common surface families |
|---|---|
| Menu controls | Button, ButtonHover, ButtonPress, ButtonDisabled |
| Primary action | Primary, PrimaryHover, PrimaryPress |
| In-game commands | HudMenuBtn, HudMenuBtnHover, HudMenuBtnPress, HudMenuBtnDisabled |
| Navigation | NavItem, NavItemHover, NavItemActive, PillIdle, PillIdleHover, PillSelected |
| Fields | FormField, FormFieldFocus, FormValue |
| Sliders | SliderTrack, SliderFill, SliderKnob, SliderKnobHover |
| Checks/toggles | FormCheckbox*, ToggleOff, ToggleOn, ToggleKnobOff, ToggleKnobOn |
| Focus | FocusRing plus readable selected/disabled colours |
| Containers and headers | Panel, Section, TopBar, Footer, FormHeader, OptionsCard, HudPanel, HudWell |
* denotes a family, not a literal TOML name. Dropdowns use the shared choice
control; the selected faction emblem, name and arrow share one trigger. Theme
styling cannot turn a button into another action, change enabled conditions,
remove match restrictions or rewrite the game rules.
Carry the identity into gameplay
Keep the minimap, build pictures, command buttons, resource bars and unit status
readable while the battlefield is moving. The framed HUD has separate surface
names for its rail, top and bottom bars, resource wells, build tiles, command
controls and selection picture. Overlay families include HudScore*, HudChat*,
HudMenu*, HudHelp* and HudBuildTree*. These use the same theme selection.
Do not hide status information behind decoration. Test selected/queued build items, disabled actions, armed orders, focus, long names, tooltips and both narrow and wide rails. Use the inherited metal/energy identities or replace them with a consistent, readable pair. Authored panel frames use the same nine-slice surface contract as menu controls. Arbitrary replacement HUD layouts remain unsupported.
What goes wrong
A state you leave out is not an error and logs nothing: it keeps the base theme's look for that state. The player sees it as a control that jumps back to the old style when hovered, pressed or disabled. Hover, press and disable each control in the menus and the HUD to find them.