Sliders are elements intended to display or allow the user to choose a value in a range. They are often used for configuration, to choose scale, camera distance, and similar settings. Like Buttons, Sliders can be enabled or disabled, but unlike Buttons, they include no support for automatically changing appearance when this is done. You can set both their minimum and maximum values (one function returns or accepts both), and the step by which dragging changes their value. Sliders can be oriented either horizontally or vertically.

While you do not have to provide any code to manage the dragging of a slider's "thumb", you do have to provide a texture that will represent it, which the engine will position and draw automatically. In XML, you do this by providing a <ThumbTexture> element as a direct child of the <Slider> element, which can have any of the attributes or children allowed to any <Texture> element.

Sliders come in two common forms: thin tracks with a wide thumb, used for setting scalar options, or scroll bars used for positioning the contents of a frame.

Defined Methods

Inherited Methods

Script Handlers