TextButton
A class in Root.Township, Alta.Meta.UI.
A menu button whose label is drawn by a TextRenderer, kept in step with the button's Label.
- Listed in Menus, UI and platforms
- Inherits or implements
ButtonWithEvents
Constructors
| Member | What it is |
|---|---|
TextButton() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
2 private and internal fields
| Member | What it is |
|---|---|
private GameObject buttonObject | The GameObject that SetButtonLayer changes. |
private TextRenderer textRenderer | The text that shows the label. |
Methods
2 private and internal methods
| Member | What it is |
|---|---|
private void OnLabelChanged(Button obj) | Copies the new label to the text renderer. |
private void OnValidate() | Editor: syncs the label and the text renderer, taking the text when the label is empty. |
Used in
Members of other types that take, return or hold a TextButton: