use of com.kotcrab.vis.ui.widget.VisCheckBox in project HyperLap2D by rednblackgames.
the class UIFilterMenu method addFilter.
public void addFilter(IAbstractResourceFilter filter) {
VisCheckBox checkBox = StandardWidgetsFactory.createCheckBox(filter.name);
checkBox.setChecked(filter.isActive());
checkBox.addListener(new CheckBoxChangeListener(UIResourcesTabMediator.CHANGE_ACTIVE_FILTER, filter.id));
add(checkBox).padTop(2).padBottom(2).row();
pack();
}
use of com.kotcrab.vis.ui.widget.VisCheckBox in project HyperLap2D by rednblackgames.
the class ValueBooleanBoxProducer method createValuePart.
private GraphBoxPartImpl<T> createValuePart(Skin skin, boolean v) {
HorizontalGroup horizontalGroup = new HorizontalGroup();
final VisCheckBox checkBox = StandardWidgetsFactory.createCheckBox("Value");
checkBox.addListener(new ClickListener() {
@Override
public void clicked(InputEvent event, float x, float y) {
checkBox.fire(new GraphChangedEvent(false, true));
}
});
checkBox.setChecked(v);
horizontalGroup.addActor(checkBox);
GraphBoxPartImpl<T> colorPart = new GraphBoxPartImpl<T>(horizontalGroup, new GraphBoxPartImpl.Callback() {
@Override
public void serialize(Map<String, String> object) {
if (checkBox.isChecked())
object.put("v", "t");
else
object.remove("v");
}
});
colorPart.setOutputConnector(GraphBoxOutputConnector.Side.Right, configuration.getNodeOutputs().get("value"));
return colorPart;
}
use of com.kotcrab.vis.ui.widget.VisCheckBox in project gdx-graph by MarcinSc.
the class ValueBooleanBoxProducer method createValuePart.
private GraphBoxPartImpl createValuePart(boolean v) {
HorizontalGroup horizontalGroup = new HorizontalGroup();
final VisCheckBox checkBox = new VisCheckBox("Value");
checkBox.addListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
checkBox.fire(new GraphChangedEvent(false, true));
}
});
checkBox.setChecked(v);
horizontalGroup.addActor(checkBox);
GraphBoxPartImpl colorPart = new GraphBoxPartImpl(horizontalGroup, new GraphBoxPartImpl.Callback() {
@Override
public void serialize(JsonValue object) {
object.addChild("v", new JsonValue(checkBox.isChecked()));
}
});
colorPart.setOutputConnector(GraphBoxOutputConnector.Side.Right, configuration.getNodeOutputs().get("value"));
return colorPart;
}
use of com.kotcrab.vis.ui.widget.VisCheckBox 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.kotcrab.vis.ui.widget.VisCheckBox in project talos by rockbite.
the class EmConfigModuleWrapper method configureSlots.
@Override
protected void configureSlots() {
addOutputSlot("config", EmConfigModule.OUTPUT);
additiveBox = new VisCheckBox("additive");
blendAddBox = new VisCheckBox("blendadd");
attachedBox = new VisCheckBox("attached");
continuousBox = new VisCheckBox("continuous");
alignedBox = new VisCheckBox("aligned");
immortalBox = new VisCheckBox("immortal");
Table form = new Table();
form.add(additiveBox).left().padLeft(3);
form.row();
form.add(blendAddBox).left().padLeft(3);
form.row();
form.add(attachedBox).left().padLeft(3);
form.row();
form.add(continuousBox).left().padLeft(3);
form.row();
form.add(alignedBox).left().padLeft(3);
form.row();
form.add(immortalBox).left().padLeft(3);
contentWrapper.add(form).left();
contentWrapper.add().expandX();
rightWrapper.add().expandY();
additiveBox.addListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
fromUIToData();
}
});
blendAddBox.addListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
fromUIToData();
}
});
attachedBox.addListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
fromUIToData();
}
});
continuousBox.addListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
fromUIToData();
}
});
alignedBox.addListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
fromUIToData();
}
});
immortalBox.addListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
fromUIToData();
}
});
}
Aggregations