Table of Contents

RegisterCallbackAsEnum Method

RegisterCallbackAsEnum<T>(VisualElement, Action<EventBase, T, object?>, bool)

public static void RegisterCallbackAsEnum<T>(this VisualElement canNotifyChangeEvent_string, Action<EventBase, T, object?> callback, bool delayRequired) where T : Enum

Parameters

canNotifyChangeEvent_string VisualElement
callback Action<EventBase, T, object>
delayRequired bool

Type Parameters

T

RegisterCallbackAsEnum<T, TState>(VisualElement, Action<EventBase, T, TState>, TState, bool)

public static void RegisterCallbackAsEnum<T, TState>(this VisualElement canNotifyChangeEvent_string, Action<EventBase, T, TState> callback, TState state, bool delayRequired) where T : Enum

Register change event as enum value. Note that callback delay is required if callback initiates GUI value update or layout animation.

Parameters

canNotifyChangeEvent_string VisualElement
callback Action<EventBase, T, TState>
state TState
delayRequired bool

Type Parameters

T
TState