use of com.talosvfx.talos.editor.widgets.propertyWidgets.PropertyWidget in project talos by rockbite.
the class PropertiesPanel method reconstruct.
private void reconstruct() {
propertyGroup.clear();
propertyWidgets.clear();
propertyGroup.top().left();
Table propertyTable = new Table();
propertyGroup.add(propertyTable).growX().padRight(5);
for (IPropertyProvider currentPropertyPanel : currentPropertyPanels) {
Array<PropertyWidget> listOfProperties = currentPropertyPanel.getListOfProperties();
if (listOfProperties != null) {
for (PropertyWidget propertyWidget : listOfProperties) {
propertyWidgets.add(propertyWidget);
propertyWidget.updateValue();
propertyTable.add(propertyWidget).growX().pad(5f).padBottom(0);
propertyTable.row();
}
propertyTable.add().height(5);
}
}
}
use of com.talosvfx.talos.editor.widgets.propertyWidgets.PropertyWidget in project talos by rockbite.
the class CameraComponent method getListOfProperties.
@Override
public Array<PropertyWidget> getListOfProperties() {
Array<PropertyWidget> properties = new Array<>();
PropertyWidget colorWidget = WidgetFactory.generate(this, "backgroundColor", "Background Color");
PropertyWidget zoomWidget = WidgetFactory.generate(this, "zoom", "Zoom");
PropertyWidget sizeWidget = WidgetFactory.generate(this, "size", "Size");
properties.add(colorWidget);
properties.add(zoomWidget);
properties.add(sizeWidget);
return properties;
}
use of com.talosvfx.talos.editor.widgets.propertyWidgets.PropertyWidget in project talos by rockbite.
the class RendererComponent method getListOfProperties.
@Override
public Array<PropertyWidget> getListOfProperties() {
Array<PropertyWidget> properties = new Array<>();
PropertyWidget orderingInLayerWidget = WidgetFactory.generate(this, "orderingInLayer", "Ordering");
SelectBoxWidget layerWidget = new SelectBoxWidget("Sorting Layer", new Supplier<String>() {
@Override
public String get() {
return sortingLayer;
}
}, new PropertyWidget.ValueChanged<String>() {
@Override
public void report(String value) {
sortingLayer = value;
}
}, new Supplier<Array<String>>() {
@Override
public Array<String> get() {
return SceneEditorAddon.get().workspace.getLayerList();
}
});
properties.add(orderingInLayerWidget);
properties.add(layerWidget);
return properties;
}
use of com.talosvfx.talos.editor.widgets.propertyWidgets.PropertyWidget in project talos by rockbite.
the class ScriptComponent method getListOfProperties.
@Override
public Array<PropertyWidget> getListOfProperties() {
Array<PropertyWidget> properties = new Array<>();
AssetSelectWidget widget = new AssetSelectWidget("Script", "ts", new Supplier<String>() {
@Override
public String get() {
return path;
}
}, new PropertyWidget.ValueChanged<String>() {
@Override
public void report(String value) {
path = value;
}
});
properties.add(widget);
return properties;
}
use of com.talosvfx.talos.editor.widgets.propertyWidgets.PropertyWidget in project talos by rockbite.
the class GameObject method getListOfProperties.
@Override
public Array<PropertyWidget> getListOfProperties() {
Array<PropertyWidget> properties = new Array<>();
EditableLabelWidget labelWidget = new EditableLabelWidget("Name", new Supplier<String>() {
@Override
public String get() {
return name;
}
}, new PropertyWidget.ValueChanged<String>() {
@Override
public void report(String value) {
SceneEditorAddon.get().workspace.changeGOName(GameObject.this, value);
}
});
properties.add(labelWidget);
return properties;
}
Aggregations