Skip to reading
Images, Carousels & Choice Controls

15. Add a Slider

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

A slider lets the player choose a number by moving a handle along a track. This example chooses an illustration’s opacity from 0 to 100, then applies it to an Image.

1. Create a Preferences Example GUI with ID settings_lab.

2. Add a Label with the caption Illustration opacity.

3. Add a Slider with ID opacity_slider. Use X 40, Y 402, Width 455 and Height 50.

4. Open Type Settings. Set Minimum 0, Maximum 100, Value 75 and Step 5.

5. Enable Preview and move the handle. Check that it stays within the range.

Figure 24. The range uses Minimum, Maximum, Value and Step. Checked and Radio Group are shared-section fields for the other control types.

Sliders are horizontal in this workflow. Increasing their Height gives the track and handle more vertical room; it does not turn the control into a vertical slider.

Page 28 of 52Permalink
Go to page