Skip to reading
GUI Styling, Shaders & Effects

Give press and release a predictable appearance

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 illustrations

Figure 18. Held input uses the clicked image; here it is orange.

Figure 19. Release restores normal artwork; here it is blue.

1. Assign a normal background image, a hover image and a clicked image.

2. Enter the Button with the pointer and check hover.

3. Hold the left mouse button or touch and check pressed artwork.

4. Release over the control. The original image should return.

5. Move out and back in to see hover again. Also test a release outside the control.

After release, the image-state system can suppress hover under the stationary pointer until a fresh enter. That prevents the pressed art from appearing to stick. A selected inventory cell or checked option may keep a separate selected style.

Test keyboard/gamepad focus as well as mouse hover where your game supports it. Keep focus and selected feedback visible; they serve different purposes from a momentary press.

Page 25 of 70Permalink
Go to page