Search in sources :

Example 1 with PropertyWidget

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);
        }
    }
}
Also used : IPropertyProvider(com.talosvfx.talos.editor.widgets.propertyWidgets.IPropertyProvider) PropertyWidget(com.talosvfx.talos.editor.widgets.propertyWidgets.PropertyWidget)

Example 2 with PropertyWidget

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;
}
Also used : Array(com.badlogic.gdx.utils.Array) PropertyWidget(com.talosvfx.talos.editor.widgets.propertyWidgets.PropertyWidget)

Example 3 with PropertyWidget

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;
}
Also used : Array(com.badlogic.gdx.utils.Array) SelectBoxWidget(com.talosvfx.talos.editor.widgets.propertyWidgets.SelectBoxWidget) PropertyWidget(com.talosvfx.talos.editor.widgets.propertyWidgets.PropertyWidget)

Example 4 with PropertyWidget

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;
}
Also used : Array(com.badlogic.gdx.utils.Array) AssetSelectWidget(com.talosvfx.talos.editor.addons.scene.widgets.property.AssetSelectWidget) PropertyWidget(com.talosvfx.talos.editor.widgets.propertyWidgets.PropertyWidget)

Example 5 with PropertyWidget

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;
}
Also used : EditableLabelWidget(com.talosvfx.talos.editor.widgets.propertyWidgets.EditableLabelWidget) PropertyWidget(com.talosvfx.talos.editor.widgets.propertyWidgets.PropertyWidget)

Aggregations

PropertyWidget (com.talosvfx.talos.editor.widgets.propertyWidgets.PropertyWidget)9 Array (com.badlogic.gdx.utils.Array)7 AssetSelectWidget (com.talosvfx.talos.editor.addons.scene.widgets.property.AssetSelectWidget)4 ButtonPropertyWidget (com.talosvfx.talos.editor.widgets.propertyWidgets.ButtonPropertyWidget)2 FileHandle (com.badlogic.gdx.files.FileHandle)1 ComponentUpdated (com.talosvfx.talos.editor.addons.scene.events.ComponentUpdated)1 EditableLabelWidget (com.talosvfx.talos.editor.widgets.propertyWidgets.EditableLabelWidget)1 IPropertyProvider (com.talosvfx.talos.editor.widgets.propertyWidgets.IPropertyProvider)1 LabelWidget (com.talosvfx.talos.editor.widgets.propertyWidgets.LabelWidget)1 SelectBoxWidget (com.talosvfx.talos.editor.widgets.propertyWidgets.SelectBoxWidget)1