Search in sources :

Example 1 with LabelWidget

use of com.talosvfx.talos.editor.widgets.propertyWidgets.LabelWidget in project talos by rockbite.

the class FilePropertyProvider method getListOfProperties.

@Override
public Array<PropertyWidget> getListOfProperties() {
    Array<PropertyWidget> properties = new Array<>();
    LabelWidget nameWidget = new LabelWidget("Name", new Supplier<String>() {

        @Override
        public String get() {
            return fileHandle.name();
        }
    });
    ButtonPropertyWidget<String> actionWidget = new ButtonPropertyWidget<String>("action", "Open", new ButtonPropertyWidget.ButtonListener<String>() {

        @Override
        public void clicked(ButtonPropertyWidget<String> widget) {
            AssetImporter.fileOpen(fileHandle);
        }
    });
    properties.add(nameWidget);
    properties.add(actionWidget);
    return properties;
}
Also used : Array(com.badlogic.gdx.utils.Array) ButtonPropertyWidget(com.talosvfx.talos.editor.widgets.propertyWidgets.ButtonPropertyWidget) LabelWidget(com.talosvfx.talos.editor.widgets.propertyWidgets.LabelWidget) PropertyWidget(com.talosvfx.talos.editor.widgets.propertyWidgets.PropertyWidget) ButtonPropertyWidget(com.talosvfx.talos.editor.widgets.propertyWidgets.ButtonPropertyWidget)

Aggregations

Array (com.badlogic.gdx.utils.Array)1 ButtonPropertyWidget (com.talosvfx.talos.editor.widgets.propertyWidgets.ButtonPropertyWidget)1 LabelWidget (com.talosvfx.talos.editor.widgets.propertyWidgets.LabelWidget)1 PropertyWidget (com.talosvfx.talos.editor.widgets.propertyWidgets.PropertyWidget)1