A class in Root.Township, the global namespace.
A physical button with a text label that updates when the label changes.
Constructors
| Member | What it is |
|---|
LabelledButtonWrapper() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private PhysicalButton button | Backing field for Button, the wrapped physical button. |
private string label | Backing field for Label. |
private TextRenderer textRenderer | The text that shows the label. |
Properties
| Member | What it is |
|---|
PhysicalButton Button { get; } | The wrapped physical button. |
string Label { get; set; } | The button text. Setting a new value updates the text and raises LabelChanged. |
Events
Methods
| Member | What it is |
|---|
protected void Awake() | Shows the serialized label and starts updating the text on changes. |
1 private and internal method
| Member | What it is |
|---|
private void OnLabelChanged(LabelledButtonWrapper buttonWrapper) | Copies the new label to the text renderer. |
Used in
Members of other types that take, return or hold a LabelledButtonWrapper: