Skip to main content

UINodeExtensions

public static class UINodeExtensions

Namespace: DeadworksManaged.Api.UI
Source: UI/UILayout.cs#L123

Methods​

UINodeExtensions.WithId()​

Signature

public static T WithId<T>(this T n, string id) where T : UINode

Source: UI/UILayout.cs#L124

UINodeExtensions.WithStyle()​

Append a single style entry. Chain multiple calls for several properties.

Signature

public static T WithStyle<T>(this T n, string name, string value) where T : UINode

Source: UI/UILayout.cs#L133

UINodeExtensions.WithStyles()​

Append several style entries at once. Accepts either inline tuples or a pre-built array (e.g. a private static readonly (string, string)[] constant shared across nodes).

Signature

public static T WithStyles<T>(this T n, params (string Name, string Value)[] entries) where T : UINode

Source: UI/UILayout.cs#L143

UINodeExtensions.WithHoverStyle()​

Append a style that applies only while the pointer is over the node. Reverted on leave: to the value the node's normal styles declare for that property, or to the stylesheet default if they declare none.

Signature

public static T WithHoverStyle<T>(this T n, string name, string value) where T : UINode

Source: UI/UILayout.cs#L153

UINodeExtensions.WithHoverStyles()​

Append several hover style entries at once.

Signature

public static T WithHoverStyles<T>(this T n, params (string Name, string Value)[] entries) where T : UINode

Source: UI/UILayout.cs#L159

UINodeExtensions.WithPressStyle()​

Append a style that applies while the pointer is held down on the node, layered over any hover styles and reverted on release.

Signature

public static T WithPressStyle<T>(this T n, string name, string value) where T : UINode

Source: UI/UILayout.cs#L168

UINodeExtensions.WithPressStyles()​

Append several press style entries at once.

Signature

public static T WithPressStyles<T>(this T n, params (string Name, string Value)[] entries) where T : UINode

Source: UI/UILayout.cs#L174

UINodeExtensions.WithTransition()​

Declare a client-side transition: when property next changes on this node, the client interpolates to the new value over duration instead of snapping.

Call it once per property; several calls compose into the parallel lists Panorama expects. The change itself comes from UIPanel.SetStyle, because a transition needs the property to move on a node that already exists. Rebuilding the tree creates the node holding the final value, with nothing to animate from.

Signature

public static T WithTransition<T>(this T n, string property, string duration, string timing = "linear") where T : UINode

Source: UI/UILayout.cs#L190

UINodeExtensions.WithTextStyle()​

Style the text inside a Button. Without this the text Label is created on the client and cannot be reached from a plugin.

Signature

public static UIButton WithTextStyle(this UIButton b, string name, string value)

Source: UI/UILayout.cs#L200

UINodeExtensions.WithTextStyles()​

Apply several styles to a Button's text Label at once.

Signature

public static UIButton WithTextStyles(this UIButton b, params (string Name, string Value)[] entries)

Source: UI/UILayout.cs#L206

UINodeExtensions.Add()​

Signature

public static T Add<T>(this T n, params UINode[] children) where T : UINode

Source: UI/UILayout.cs#L211