use of com.talosvfx.talos.editor.widgets.ui.DragPoint in project talos by rockbite.
the class TargetModuleWrapper method configureSlots.
@Override
protected void configureSlots() {
addInputSlot("alpha", TargetModule.ALPHA_INPUT);
velocityField = addInputSlotWithTextField("velocity: ", TargetModule.VELOCITY);
Cell fromCell = addInputSlot("from", TargetModule.FROM);
Cell toCell = addInputSlot("to", TargetModule.TO);
fromLabel = getLabelFromCell(fromCell);
toLabel = getLabelFromCell(toCell);
velocityField.addListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
float velocity = floatFromText(velocityField);
module.setDefaultVelocity(velocity);
}
});
dragPointFrom = new DragPoint(0, 0);
dragPointTo = new DragPoint(0, 0);
addOutputSlot("time", TargetModule.TIME);
addOutputSlot("position", TargetModule.POSITION);
addOutputSlot("velocity", TargetModule.VELOCITY_OUT);
addOutputSlot("angle", TargetModule.ANGLE);
}
use of com.talosvfx.talos.editor.widgets.ui.DragPoint in project talos by rockbite.
the class FromToModuleWrapper method configureSlots.
@Override
protected void configureSlots() {
Cell fromCell = addInputSlot("from", FromToModule.FROM);
Cell toCell = addInputSlot("to", FromToModule.TO);
fromLabel = getLabelFromCell(fromCell);
toLabel = getLabelFromCell(toCell);
addOutputSlot("rotation", FromToModule.ROTATION);
addOutputSlot("size", FromToModule.LENGTH);
addOutputSlot("position", FromToModule.POSITION);
dragFrom = new DragPoint(-1, 0);
dragTo = new DragPoint(1, 0);
if (module != null) {
module.setDefaults(dragFrom.position, dragTo.position);
}
}
use of com.talosvfx.talos.editor.widgets.ui.DragPoint in project talos by rockbite.
the class GlobalScopeModuleWrapper method configureSlots.
@Override
protected void configureSlots() {
dragPoint = new DragPoint(0, 0);
Array<String> array = new Array<>();
for (int i = 0; i < 10; i++) {
array.add(i + "");
}
selectBox = addSelectBox(array);
addOutputSlot("output", GlobalScopeModule.OUTPUT);
}
use of com.talosvfx.talos.editor.widgets.ui.DragPoint in project talos by rockbite.
the class Vector2ModuleWrapper method configureSlots.
@Override
protected void configureSlots() {
xField = addInputSlotWithTextField("X: ", 0);
yField = addInputSlotWithTextField("Y: ", 1);
dragPoint = new DragPoint(0, 0);
xField.addListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
float x = floatFromText(xField);
module.setX(x);
dragPoint.set(x, dragPoint.position.y);
}
});
yField.addListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
float y = floatFromText(yField);
module.setY(y);
dragPoint.set(dragPoint.position.x, y);
}
});
addOutputSlot("position", 0);
}
Aggregations