use of org.terasology.nui.widgets.UISlider in project Terasology by MovingBlocks.
the class NumberRangeConstraintWidgetFactory method bindWidgetToSetting.
@Override
protected void bindWidgetToSetting(UIWidget widget) {
UISlider slider = widget.find("slider", UISlider.class);
assert slider != null;
updateSliderIfInteger(slider);
setSliderRange(slider);
slider.bindValue(new Binding<Float>() {
@Override
public Float get() {
return getSetting().get().floatValue();
}
@Override
public void set(Float value) {
setSettingValue(value);
}
});
}
Aggregations