Search in sources :

Example 1 with FloatRangeInputWidget

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());
        }
    });
}
Also used : FloatRangeInputWidget(com.talosvfx.talos.editor.widgets.FloatRangeInputWidget) Table(com.badlogic.gdx.scenes.scene2d.ui.Table) VisCheckBox(com.kotcrab.vis.ui.widget.VisCheckBox) Actor(com.badlogic.gdx.scenes.scene2d.Actor) ChangeListener(com.badlogic.gdx.scenes.scene2d.utils.ChangeListener)

Example 2 with FloatRangeInputWidget

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();
        }
    });
}
Also used : CurveWidget(com.talosvfx.talos.editor.widgets.CurveWidget) Table(com.badlogic.gdx.scenes.scene2d.ui.Table) FloatRangeInputWidget(com.talosvfx.talos.editor.widgets.FloatRangeInputWidget) Actor(com.badlogic.gdx.scenes.scene2d.Actor) ChangeListener(com.badlogic.gdx.scenes.scene2d.utils.ChangeListener)

Example 3 with FloatRangeInputWidget

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());
        }
    });
}
Also used : FloatRangeInputWidget(com.talosvfx.talos.editor.widgets.FloatRangeInputWidget) Table(com.badlogic.gdx.scenes.scene2d.ui.Table) Actor(com.badlogic.gdx.scenes.scene2d.Actor) ChangeListener(com.badlogic.gdx.scenes.scene2d.utils.ChangeListener)

Aggregations

Actor (com.badlogic.gdx.scenes.scene2d.Actor)3 Table (com.badlogic.gdx.scenes.scene2d.ui.Table)3 ChangeListener (com.badlogic.gdx.scenes.scene2d.utils.ChangeListener)3 FloatRangeInputWidget (com.talosvfx.talos.editor.widgets.FloatRangeInputWidget)3 VisCheckBox (com.kotcrab.vis.ui.widget.VisCheckBox)1 CurveWidget (com.talosvfx.talos.editor.widgets.CurveWidget)1