Hey there,
so i got a few questions concerning Sliders.
- Styling sliders via a style.groovy should work according to the documentation, did it like described but it seems like nothing is happening.
The code:
private Container mouseContainer(){
final Container mouseContainer = new Container();
final Label mouseXText = new Label(BUNDLE.getString("option.mouseXAxis"), "doom");
mouseXText.setFontSize(FontSizes.OPTIONS.getSize());
final Slider mouseX = new Slider("doom");
final Label mouseYText = new Label(BUNDLE.getString("option.mouseYAxis"), "doom");
mouseYText.setFontSize(FontSizes.OPTIONS.getSize());
final Slider mouseY = new Slider("doom");
mouseContainer.addChild(mouseXText);
mouseContainer.addChild(mouseX);
mouseContainer.addChild(mouseYText);
mouseContainer.addChild(mouseY);
return mouseContainer;
}
The .groovy:
selector("slider.left.button", "doom"){
color = color(0.4, 0.45, 0.5, 0.85f)
}
selector("slider.right.button", "doom"){
color = color(0.4, 0.45, 0.5, 0.85f)
}
selector("slider.range", "doom"){
color = color(1,1,1,1)
}
I believe this it he intended way to style them.
Ingame it looks like this:
Possible bug?
Another thing i have noticed is the missing + at the right side to increment my slider. I initally thought that i cut the slider of inside the container. Played around with it and couldn’t fix the issue. I can only assume that it has to to something with the class itself since i am basically using the default constructor. But maybe i am missing something.
Thanks for the help guys.