class MAGES::Editor::EditableLabel

Overview

A label that can be edited. More…

class EditableLabel:
    public BindableElement,
    public INotifyValueChanged< string >
{
public:
    // classes

    class UxmlFactory;
    class UxmlTraits;

    // properties

    string value;

    // methods

    EditableLabel();
    EditableLabel(string text = "Name", string postfix = null);
    EditableLabel(SerializedProperty property, string postfix = null);
    void SetEditMode(bool on);
    void SetValueWithoutNotify(string newValue);
};

Detailed Documentation

A label that can be edited.

Usefull for showing information that doesn’t need to be edited often, and acts as a name for an important element.

Properties

string value

Gets or sets the text.

Methods

EditableLabel()

Initializes a new instance of the EditableLabel class.

EditableLabel(string text = "Name", string postfix = null)

Initializes a new instance of the EditableLabel class.

Parameters:

text

The text.

postfix

The postfix.

EditableLabel(SerializedProperty property, string postfix = null)

Initializes a new instance of the EditableLabel class.

Parameters:

property

The property.

postfix

The postfix.

void SetEditMode(bool on)

Forces edit mode enabled, or disabled, until changed either by the user or by code.

Parameters:

on

Set to true to show the label in editing mode.

void SetValueWithoutNotify(string newValue)

Sets the value without notifying the listeners.

Parameters:

newValue

The new text.