Show / Hide Table of Contents

Class UIElement

Used for displaying a field or property in the settings menu

Inheritance
object
Object
Component
Behaviour
MonoBehaviour
UIElement
BoolElement
EnumElement
FunctionElement
HeaderElement
NumberElement
SpaceElement
StringElement
Implements
IPointerEnterHandler
IEventSystemHandler
Namespace: WeaverCore.Settings.Elements
Assembly: WeaverCore.dll
Syntax
public abstract class UIElement : MonoBehaviour, IPointerEnterHandler, IEventSystemHandler

Properties

| Edit this page View Source

FieldAccessor

The accessor used for retrieving the value of the field or property

Declaration
public IAccessor FieldAccessor { get; }
Property Value
Type Description
IAccessor
| Edit this page View Source

Order

The order in which the UI element is arranged on the settings menu

Declaration
public int Order { get; set; }
Property Value
Type Description
int
| Edit this page View Source

Panel

Declaration
public GlobalSettings Panel { get; }
Property Value
Type Description
GlobalSettings
| Edit this page View Source

Title

The title of the UI Element

Declaration
public string Title { get; set; }
Property Value
Type Description
string
| Edit this page View Source

TitleComponent

The title component of the UI Element

Declaration
public TextMeshProUGUI TitleComponent { get; set; }
Property Value
Type Description
TextMeshProUGUI
| Edit this page View Source

Visible

Whether the UIElement is visible

Declaration
public bool Visible { get; set; }
Property Value
Type Description
bool

Methods

| Edit this page View Source

CanWorkWithAccessor(IAccessor)

Whether or not this UI Element can work with the specified accessor

Declaration
public abstract bool CanWorkWithAccessor(IAccessor accessor)
Parameters
Type Name Description
IAccessor accessor

The accessor to check against

Returns
Type Description
bool
| Edit this page View Source

MoveDown()

Moves the UI Element down by one

Declaration
public void MoveDown()
| Edit this page View Source

MoveToBottom()

Moves the UI Element to the bottom of the settings menu

Declaration
public void MoveToBottom()
| Edit this page View Source

MoveToTop()

Moves the UI Element to the top of the settings menu

Declaration
public void MoveToTop()
| Edit this page View Source

MoveUp()

Moves the UI Element up by one

Declaration
public void MoveUp()
| Edit this page View Source

OnAccessorChanged(IAccessor)

Called whenever the accessor gets changed

Declaration
protected virtual void OnAccessorChanged(IAccessor accessor)
Parameters
Type Name Description
IAccessor accessor

The new accessor

| Edit this page View Source

OnPointerEnter(PointerEventData)

Called when the mouse hovers over the ui element. Default behaviour is to call SetDescription(string) to update the description

Declaration
public virtual void OnPointerEnter(PointerEventData eventData)
Parameters
Type Name Description
PointerEventData eventData
| Edit this page View Source

Refresh()

Refreshes the UI Element so it's displaying the most recent version of the field or property

Declaration
public void Refresh()

Events

| Edit this page View Source

DisplayValueUpdated

Declaration
public event Action<IAccessor> DisplayValueUpdated
Event Type
Type Description
Action<IAccessor>

Implements

UnityEngine.EventSystems.IPointerEnterHandler
UnityEngine.EventSystems.IEventSystemHandler

Extension Methods

ReflectionUtilities.ReflectCallMethod(object, string, object[], BindingFlags)
ReflectionUtilities.ReflectGetField(object, string, BindingFlags)
ReflectionUtilities.ReflectGetMethod(object, string, BindingFlags)
ReflectionUtilities.ReflectGetProperty(object, string, BindingFlags)
ReflectionUtilities.ReflectSetField(object, string, object, BindingFlags)
ReflectionUtilities.ReflectSetProperty(object, string, object, BindingFlags)
CoroutineUtilities.RunCoroutineWhile<T>(T, IEnumerator, Func<bool>)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾