Report as inappropriate.
This is a slider to allow the user to select a number
Use the buttons to test each of them methods available on the slider (which would normally be called in the code of the scenario using the slider.)
The user can select a value between zero and the maximum value (inclusive).
The selected value can be displayed next to the slider as a number or a percentage, or hidden.
You can set sectons to be marked on the slider.
To use the slider in your own project, create an Actor class called 'Slider', download the source code for this demo, and replace all the code in your Slider class with the entire contents of the Slider class from this demo.
Note: if the speed is decreased in Greenfoot, then the slider will not move smoothly, but only update on each execution of act. Also, if the size of the cells specified when the world is created is greater than one pixel then the slider will only be able to move in increments equal to the size of the cells.
For an example of the slider in use, see my 'WarBugs' game.
7627 views / 9 in the last 7 days
2 votes | 0 in the last 7 days
This scenario is a member of: Reusable actors & support classes
Want to leave a comment? You must first log in.