Search in sources :

Example 6 with AssetSelectWidget

use of com.talosvfx.talos.editor.addons.scene.widgets.property.AssetSelectWidget in project talos by rockbite.

the class SpineMetadata method getListOfProperties.

@Override
public Array<PropertyWidget> getListOfProperties() {
    Array<PropertyWidget> propertyWidgets = new Array<>();
    propertyWidgets.add(WidgetFactory.generate(this, "scale", "Scale"));
    AssetSelectWidget atlasWidget = new AssetSelectWidget("Atlas", "atlas", new Supplier<String>() {

        @Override
        public String get() {
            return atlasPath;
        }
    }, new PropertyWidget.ValueChanged<String>() {

        @Override
        public void report(String value) {
            atlasPath = value;
        }
    });
    propertyWidgets.add(atlasWidget);
    return propertyWidgets;
}
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)

Aggregations

Array (com.badlogic.gdx.utils.Array)6 AssetSelectWidget (com.talosvfx.talos.editor.addons.scene.widgets.property.AssetSelectWidget)6 PropertyWidget (com.talosvfx.talos.editor.widgets.propertyWidgets.PropertyWidget)4 FileHandle (com.badlogic.gdx.files.FileHandle)1 ComponentUpdated (com.talosvfx.talos.editor.addons.scene.events.ComponentUpdated)1 SpineMetadata (com.talosvfx.talos.editor.addons.scene.utils.metadata.SpineMetadata)1 ButtonPropertyWidget (com.talosvfx.talos.editor.widgets.propertyWidgets.ButtonPropertyWidget)1