Search in sources :

Example 1 with SelectBoxWidget

use of com.talosvfx.talos.editor.widgets.propertyWidgets.SelectBoxWidget 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)

Aggregations

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