Nifty GUI creating a Slider to make settings

I am programming a Curling-Game. And when the player is going to throw a stone he has to set the speed, the rotation and the direction.

I want to solve this problem with sliders. The problem is I don´t know to implements the controller-class for it. My control consisting of an Image of the sliderbackground and a image for the slidebutton.

[xml]

<controlDefinition name="slider" controller="curlingxtreme.gui.controls.SimpleSlider">

<image id="scrollbackground" filename="Interface/Slider/sliderhintergrund.png" width="100%" childLayout="absolute">

<image id="slide" x="30px" y="2px" width="15px" height="26px" filename="Interface/Slider/sliderregler.png"/>

</image>

</controlDefinition>

[/xml]



Can someone give me a hint how I could start with the Controller?



Thanks in advamce

There is a tutorial available that shows how you can create your own Progressbar Control step by step in every little detail. I think this might help you creating a Slider too. It’s available in the Nifty wiki at sf.net: http://sourceforge.net/apps/mediawiki/nifty-gui/index.php?title=Create_your_own_Control_%28A_Nifty_Progressbar%29



There is a pending feature request for the upcoming Nifty 1.3 release that will add exactly what you want as a Nifty Standard control: http://sourceforge.net/tracker/?func=detail&aid=2852171&group_id=223898&atid=1059825



And there already is a SimpleSlider control hidden in the nifty-default-control Project. Here is the link to the source file: http://nifty-gui.svn.sourceforge.net/viewvc/nifty-gui/nifty-default-controls/trunk/src/main/java/de/lessvoid/nifty/controls/scrollbar/controller/SimpleSlider.java?revision=1181&view=markup



BUT that last control hasn’t been updated in years I think. So I don’t know if it will work as is but it might help you as a reference.