Search in sources :

Example 1 with EditableLabelWidget

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

EditableLabelWidget (com.talosvfx.talos.editor.widgets.propertyWidgets.EditableLabelWidget)1 PropertyWidget (com.talosvfx.talos.editor.widgets.propertyWidgets.PropertyWidget)1