use of com.talosvfx.talos.editor.widgets.IntegerInputWidget in project talos by rockbite.
the class PolylineModuleWrapper method configureSlots.
@Override
protected void configureSlots() {
defaultRegion = new TextureRegion(new Texture(Gdx.files.internal("fire.png")));
addInputSlot("offset", PolylineModule.OFFSET);
addInputSlot("thickness", PolylineModule.THICKNESS);
addInputSlot("color", PolylineModule.COLOR);
addInputSlot("transparency", PolylineModule.TRANSPARENCY);
addInputSlot("left tangent", PolylineModule.LEFT_TANGENT);
addInputSlot("right tangent", PolylineModule.RIGHT_TANGENT);
interpolationPoints = new IntegerInputWidget("interpolation points", getSkin());
interpolationPoints.setValue(0);
leftWrapper.add(interpolationPoints).left().expandX();
interpolationPoints.setListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
module.setInterpolationPoints(interpolationPoints.getValue());
}
});
dropWidget = new TextureDropWidget<AbstractModule>(defaultRegion, getSkin());
rightWrapper.add(dropWidget).size(50).right().row();
rightWrapper.add().growY().row();
addOutputSlot("output", PolylineModule.OUTPUT);
}
use of com.talosvfx.talos.editor.widgets.IntegerInputWidget in project talos by rockbite.
the class RibbonModuleWrapper method configureSlots.
@Override
protected void configureSlots() {
addInputSlot("main texture", RibbonModule.MAIN_REGION);
addInputSlot("ribbon texture", RibbonModule.RIBBON_REGION);
addInputSlot("thickness", RibbonModule.THICKNESS);
addInputSlot("transparency", RibbonModule.TRANSPARENCY);
addInputSlot("color", RibbonModule.COLOR);
addOutputSlot("output", RibbonModule.OUTPUT);
detailCount = new IntegerInputWidget("detail count:", getSkin());
detailCount.setValue(20);
leftWrapper.add(detailCount).left().expandX().row();
detailCount.setListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
module.setDetailCount(detailCount.getValue());
}
});
memoryDuration = new FloatInputWidget("memory:", getSkin());
memoryDuration.setValue(1);
leftWrapper.add(memoryDuration).left().expandX().padLeft(3);
memoryDuration.setListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
module.setMemoryDuration(memoryDuration.getValue());
}
});
}
use of com.talosvfx.talos.editor.widgets.IntegerInputWidget in project talos by rockbite.
the class FlipbookModuleWrapper method configureSlots.
@Override
protected void configureSlots() {
super.configureSlots();
dropWidget = new TextureDropWidget<AbstractModule>(defaultRegion, getSkin(), 100f);
addInputSlot("phase", FlipbookModule.PHASE);
rows = new IntegerInputWidget("Rows", getSkin());
cols = new IntegerInputWidget("Cols", getSkin());
duration = new FloatInputWidget("Duration", getSkin());
rows.setValue(1);
cols.setValue(1);
duration.setValue(1f);
leftWrapper.add(rows).padTop(5f).left().expandX().row();
leftWrapper.add(cols).left().expandX().row();
leftWrapper.add(duration).padLeft(5).left().expandX().row();
rightWrapper.add(dropWidget).size(100).right().row();
rightWrapper.add().growY().row();
addOutputSlot("output", FlipbookModule.OUTPUT);
rows.setListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
module.setRows(rows.getValue());
}
});
duration.setListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
module.duration = duration.getValue();
}
});
cols.setListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
module.setCols(cols.getValue());
}
});
}
use of com.talosvfx.talos.editor.widgets.IntegerInputWidget in project talos by rockbite.
the class NinePatchModuleWrapper method configureSlots.
@Override
protected void configureSlots() {
addInputSlot("input", NinePatchModule.INPUT);
addOutputSlot("output", NinePatchModule.OUTPUT);
leftSplit = new IntegerInputWidget("left split", getSkin());
leftWrapper.add(leftSplit).left().expandX().padLeft(3).row();
rightSplit = new IntegerInputWidget("right split", getSkin(), Align.right);
rightWrapper.add(rightSplit).right().expandX().padRight(3).row();
topSplit = new IntegerInputWidget("top split", getSkin());
leftWrapper.add(topSplit).left().expandX().padLeft(3);
bottomSplit = new IntegerInputWidget("bottom split", getSkin(), Align.right);
rightWrapper.add(bottomSplit).right().expandX().padRight(3);
ChangeListener changeListener = new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
updateValues();
}
};
leftSplit.addListener(changeListener);
rightSplit.addListener(changeListener);
topSplit.addListener(changeListener);
rightWrapper.addListener(changeListener);
}
Aggregations