Class TextComponent<TElement>
Related to:SoyWar.UIToolkit.Elements
/
Inherits from:objectObjectComponentBehaviourMonoBehaviourUIToolkitComponentUIToolkitComponent<TElement>ControlComponent<TElement,string>
/
Implemented in:SoyWar.UIToolkit.dll
Implements interfaces:IUIToolkitEvent<TElement>IEnumerable<TElement>IEnumerable
Description
Abstract class to define the text ofTextElement.
Syntax
public abstract class TextComponent<TElement> : ControlComponent<TElement, string>, IUIToolkitEvent<TElement>, IEnumerable<TElement>, IEnumerable where TElement : TextElementType Parameters
| Name | Description |
|---|---|
| TElement | Class based onTextElement. |
Properties
| Name | Description |
|---|---|
| OnTextChangedEvent | This event is called when the text has changed. |
Methods
| Name | Description |
|---|---|
| SetText(string) | Set the text for allTextElementlinked to this component. |
Extension Methods
Inherited Members
Properties
| Name | Description |
|---|---|
| OnStateChangedEvent | This event is called when the state has changed. |
| OffEvent | This event is called when an element is removed. |
| OnEvent | This event is called when an element is added. |
| Document | |
| OverrideHost | Chooses a template as host instead of the main document. |
| SearchFrom | Targets children from the parent's container (indirect) or via the hierarchy (direct). |
| Selector | |
| Target | Targets the first, last or all active elements. |
Methods
| Name | Description |
|---|---|
| CheckStateChangedEvent(ChangeEvent<TValue>) | Called to confirm if the state has changed. |
| OnStateChanged(ChangeEvent<TValue>) | Called when the state has changed. |
| GetEnumerator() | |
| Set(TElement) | |
| Unset(TElement) | |
| AddCustomStyles(StyleSheet) | Adds custom style for all targeted elements. |
| AddCustomStyles(params StyleSheet[]) | Adds custom styles for all targeted elements. |
| Count() | Count the number of active elements |
| ForceElementsUpdate() | Forces elements to be updated. |
| RemoveCustomStyles(StyleSheet) | Removes custom style from all targeted elements. |
| RemoveCustomStyles(params StyleSheet[]) | Removes custom styles from all targeted elements. |
| SetSelectorFromText(string) | |
| SetSelectorFromText(string, out string) | |
| Validate() | Checks if the document and the selector is valid. |
Operators
| Name |
|---|
| implicit operator TElement(UIToolkitComponent<TElement>) |
