Skip to reading
GUI Styling, Shaders & Effects

Use the correct state for the correct control

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page

An Image element’s hover and clicked images can replace its content art. On a Button, those image fields provide its surface art behind the caption. Keep the canvas size and composition consistent across each set of state images.

For inventory and saves, image states exist at several regions: widget, grid, slot and save screenshot. A slot’s selected background/border can remain while its pressed picture returns to normal. That is intentional selection feedback.

Checkboxes and radio buttons need a readable checked state. Use explicit wording as well as the mark. A disabled Button should still explain its purpose; avoid reducing everything to an unreadable gray smudge.

Source table from Use the correct state for the correct control, page 26
TestLook for
Hover then leaveA useful transition back to normal.
Press then release outsideNo stranded pressed picture.
Lose focus during a pressA clean return when input is canceled.
Choose a persistent optionChecked/selected stays distinguishable from held input.
Touch without hoverEvery essential action remains discoverable.

If a GUI click also changes its background image through a script, that becomes the new authored/runtime value. Do not confuse an explicit game action with the temporary image-state system.

Page 26 of 70Permalink
Go to page