Перейти к основному содержимому

Class IMGUIContainerExtensions

Namespace: Aspid.FastTools.UIElements
Assembly: Aspid.FastTools.dll

Provides extension methods for IMGUIContainer.

public static class IMGUIContainerExtensions

Inheritance​

object ← IMGUIContainerExtensions

Methods​

AddOnGUIHandler<T>(T, Action)​

Subscribes to the onGUIHandler callback.

public static T AddOnGUIHandler<T>(this T element, Action value) where T : IMGUIContainer

Parameters​

element T

The element to modify.

value Action

The handler to add.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

MarkDirtyLayoutSelf<T>(T)​

Marks the IMGUI layout as dirty via MarkDirtyLayout.

public static T MarkDirtyLayoutSelf<T>(this T element) where T : IMGUIContainer

Parameters​

element T

The element to modify.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

RemoveOnGUIHandler<T>(T, Action)​

Unsubscribes from the onGUIHandler callback.

public static T RemoveOnGUIHandler<T>(this T element, Action value) where T : IMGUIContainer

Parameters​

element T

The element to modify.

value Action

The handler to remove.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

SetContextType<T>(T, ContextType)​

Sets contextType.

public static T SetContextType<T>(this T element, ContextType value) where T : IMGUIContainer

Parameters​

element T

The element to modify.

value ContextType

The context type to set.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

Remarks​

Only Editor is currently supported by Unity.

SetCullingEnabled<T>(T, bool)​

Sets cullingEnabled.

public static T SetCullingEnabled<T>(this T element, bool value) where T : IMGUIContainer

Parameters​

element T

The element to modify.

value bool

When true, the handler is not called while the element is outside the viewport.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

SetOnGUIHandler<T>(T, Action)​

Sets the onGUIHandler callback, replacing any existing handler.

public static T SetOnGUIHandler<T>(this T element, Action value) where T : IMGUIContainer

Parameters​

element T

The element to modify.

value Action

The handler to set.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.