Novelty object reference > Slider


The Slider object is a generic scrollbar control. It produces a numeric value whenever the user moves its thumb, which can be linked to a ScrollCanvas, a game variable or a script.

A slider is composed from two parts: the bar and the thumb (see fig 2). Both of these can be customized with NoveltyML.

Fig 1: A Slider object

Fig 2: Sliders are made up of a bar and a thumb


Example use cases:


Visual components (such as Borders, Images) of a Slider will be automatically sized to fill the slider's rectangle unless a specific size is set.

The value of a slider can be linked to a script function, which gets called whenever the thumb is moved. Any function that returns void and takes one int, float or a double will work.

Related articles

Sample NoveltyML

<!-- Slider with a border as the bar and an image as the thumb -->
<Slider name="My slider" >
		<Border texture="My border texture" color="grey" />
		<Image texture="My texture" />

Back to top