use of com.talosvfx.talos.editor.widgets.FloatRangeInputWidget in project talos by rockbite.
the class RandomRangeModuleWrapper method configureSlots.
@Override
protected void configureSlots() {
addInputSlot("min", RandomRangeModule.MIN_INPUT);
addInputSlot("max", RandomRangeModule.MAX_INPUT);
addOutputSlot("result", 0);
distribution = new VisCheckBox("distributed");
rightWrapper.add(distribution).right().expandX().padRight(3).row();
inputRange = new FloatRangeInputWidget("Min", "Max", getSkin());
inputRange.setValue(1, 1);
contentWrapper.add(inputRange).left().padTop(40).padLeft(4).expandX();
leftWrapper.add(new Table()).expandY();
rightWrapper.add(new Table()).expandY();
inputRange.setListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
updateValues();
}
});
distribution.addListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
module.setDistributed(distribution.isChecked());
}
});
}
use of com.talosvfx.talos.editor.widgets.FloatRangeInputWidget in project talos by rockbite.
the class DynamicRangeModuleWrapper method configureSlots.
@Override
protected void configureSlots() {
addInputSlot("alpha (0 to 1)", InterpolationModule.ALPHA);
addOutputSlot("output", 0);
Table container = new Table();
highInput = new FloatRangeInputWidget("HMin", "HMax", getSkin());
lowInput = new FloatRangeInputWidget("LMin", "LMax", getSkin());
lowInput.setValue(0, 0);
highInput.setValue(1, 1);
container.add(highInput).row();
container.add().height(3).row();
container.add(lowInput);
contentWrapper.add(container).left().padTop(20).expandX().padLeft(4);
curveWidget = new CurveWidget(getSkin());
curveWidget.setDataProvider(this);
contentWrapper.add(curveWidget).left().growY().width(200).padTop(23).padRight(3).padLeft(4).padBottom(3);
leftWrapper.add(new Table()).expandY();
rightWrapper.add(new Table()).expandY();
highInput.setListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
updateValues();
}
});
lowInput.setListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
updateValues();
}
});
}
use of com.talosvfx.talos.editor.widgets.FloatRangeInputWidget in project talos by rockbite.
the class FakeMotionBlurModuleWrapper method configureSlots.
@Override
protected void configureSlots() {
addInputSlot("velocity", FakeMotionBlurModule.VELOCITY);
addOutputSlot("size", FakeMotionBlurModule.SIZE);
velocityMinMax = new FloatRangeInputWidget("Vel Min", "Vel Max", getSkin(), true);
sizeMinMax = new FloatRangeInputWidget("Size Min", "Size Max", getSkin(), true);
contentWrapper.add(velocityMinMax).center().padTop(20).padLeft(4).row();
contentWrapper.add(sizeMinMax).center().padTop(0).padLeft(4).row();
leftWrapper.add(new Table()).expandY();
rightWrapper.add(new Table()).expandY();
velocityMinMax.setListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
module.setVelocityMin(velocityMinMax.getMinValue());
module.setVelocityMax(velocityMinMax.getMaxValue());
}
});
sizeMinMax.setListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
module.setSizeMin(sizeMinMax.getMinValue());
module.setSizeMax(sizeMinMax.getMaxValue());
}
});
}
Aggregations