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.


<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"/>




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

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:

And there already is a SimpleSlider control hidden in the nifty-default-control Project. Here is the link to the source file:

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.