Sliders can be used to show or get progress.
<slider text="position" progress="50" progressmax="100" onchange="update" />
actions.update = function (progress)
print("progress was changed to " .. progress);
end
Set the ID for this control so that it can be updated later. See layout library.
<slider id="my_slider" text="foo" />
Set the visibility state using visible
or invisible
or gone
.
<slider visibility="gone" />
Set additional text to be shown in the slider.
<slider text="hello world" progress="50" progressmax="100" />
will show:
hello world - 50%
If you don't specify a text
only the percentage will be shown:
50%
Set the current progress value of the slider.
<slider progress="99" />
Set the maximum progress value of the slider (default 100
).
<slider progressmax="200" />
See the styling page for more details.
Occurs when the slider progress is changing.
<slider onchange="changing" />
actions.changing = function (value)
...
end
Occurs when the slider has finished changing value.
<slider ondone="finish" />
actions.finish = function (value)
...
end
Occurs when the slider is pressed (i.e. starts sliding).
<slider ondown="start" />
actions.start = function (value)
...
end
Occurs when the slider is released (i.e. stops sliding).
<slider onup="stop" />
actions.stop = function (value)
...
end