Skip to reading
Replace the Built-in Screens

Build six correctly ranged Sliders

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 29. A volume Slider uses 0 to 1 with a small step, not a generic 0-to-100 range.

Source table from Build six correctly ranged Sliders, page 42
Element IDOption keyMinimum / maximum / step
opt_mastermasterVolume0 / 1 / 0.01
opt_musicmusicVolume0 / 1 / 0.01
opt_sfxsfxVolume0 / 1 / 0.01
opt_voicevoiceVolume0 / 1 / 0.01
opt_texttextSpeed0.1 / 5 / 0.05
opt_fontfontScale0.5 / 2.5 / 0.05

Place the labels at x = 180 and the Sliders at x = 400. In the sample, the six rows start at y = 160 and are spaced 58 pixels apart. Each Slider is 300 × 34. In Visual Style, start with Border Width 3 and a visible border color; a zero-thickness flat track can leave only the handle visible.

Leave the Slider’s ordinary Variable field blank for this staged example. options_tools reads the control’s value on Apply. A variable named musicVolume is not the same thing as applying the musicVolume runtime option.

Page 42 of 88Permalink
Go to page