I will make this short and sweet.
I have a custom map menu, with a bunch of sliders that the player can adjust so that a procedural world generator can use those values to create a world based on what the user wants.
While I am familiar with creating Slider objects (in libGDX), I wonder if there are any slider bars that allow me to have 2 adjustment knobs on it.
Much like what you see here, minus the range stuff:
http://jqueryui.com/demos/slider/#range
I have done a bit of browsing to try and find answers, and there is nothing significant that I have found so far.
I think the only way I will be able to make it work is to make my own MultiRangeSlider class which would extend the Slider class.
The code inside of the Slider class looks awfully scary at first glimpse to me because I am far from being a great programmer, but I think it would be worth tinkering around to see if I can create some magic.
The purpose of the multi-knob slider would be for division of land into different terrain types.
For example:
plainsSlider = 10
forestSlider = 55
mountainsSlider = 35
If the map size was set to 500, then:
plainsSlider = 10% of 500 is 50
forestSlider = 55% of 500 is 275
mountainsSlider = 35% of 500 is 175
The resulting values would determine the terrain tile threshold values in the world generator. So in this case, there would be a heavily forested mountainous map with few open plains.
Any help on the matter would be greatly appreciated. I do not ask for a copy/paste of code, but merely some direction to help me solve the problem.
It is not 100% necessary that I work out this problem, as I am happy to just use 3 seperate Slider’s, but I just think that one bar would take up less space, would make more sense to the user, and it would look better.
NOTE: I should note that I am using LibGDX too