Table of Contents

Class RadialSelectionBox<TContainer, TElement>

Namespace
RichHudFramework.UI
Assembly
RichHudClient.dll

Generic radial selection wheel (pie-menu style). Displays a collection of entries arranged in a circular pattern around a central point. Supports both cursor-based and gesture-based (drag-to-select) input methods.

public class RadialSelectionBox<TContainer, TElement> : HudCollection<TContainer, TElement>, IReadOnlyHudElement, IReadOnlyHudNode, IReadOnlyHudParent, IHudCollection<TContainer, TElement>, IReadOnlyHudCollection<TContainer, TElement>, IReadOnlyList<TContainer>, IReadOnlyCollection<TContainer>, IEnumerable<TContainer>, IEnumerable where TContainer : IScrollBoxEntry<TElement>, new() where TElement : HudElementBase

Type Parameters

TContainer

Container type that wraps each entry's UI element and provides selection/association data.

TElement

The actual UI element displayed for each entry (must support minimal labeling).

Inheritance
HudCollection<TContainer, TElement>
RadialSelectionBox<TContainer, TElement>
Implements
IHudCollection<TContainer, TElement>
IReadOnlyHudCollection<TContainer, TElement>
IReadOnlyList<TContainer>
IEnumerable<TContainer>
Derived
Inherited Members

Constructors

RadialSelectionBox(HudParentBase)

public RadialSelectionBox(HudParentBase parent = null)

Parameters

parent HudParentBase

Properties

BackgroundColor

Background color of the entire radial wheel.

public virtual Color BackgroundColor { get; set; }

Property Value

Color

CursorSensitivity

Sensitivity of cursor/gesture movement when selecting slices. Range: 0.3–2.0. Higher values make the wheel react faster to movement.

public float CursorSensitivity { get; set; }

Property Value

float

EnabledCount

Number of entries that are currently enabled and visible on the wheel.

public virtual int EnabledCount { get; protected set; }

Property Value

int

EntryList

Read-only access to the full list of entries currently in the wheel.

public virtual IReadOnlyList<TContainer> EntryList { get; }

Property Value

IReadOnlyList<TContainer>

HighlightColor

Color used for the slice under the cursor (or gesture highlight).

public virtual Color HighlightColor { get; set; }

Property Value

Color

HighlightIndex

Index of the currently highlighted entry in EntryList. -1 if nothing highlighted.

public virtual int HighlightIndex { get; protected set; }

Property Value

int

HighlightedEntry

The entry currently under the cursor or highlighted by gesture. Returns null/default if none.

public virtual TContainer HighlightedEntry { get; }

Property Value

TContainer

InnerRadius

The radius of the inner hole as a normalized fraction of the outer radius. Range: 0.0 (solid circle) to 1.0 (infinitely thin ring).

public float InnerRadius { get; set; }

Property Value

float

MaxEntryCount

Desired maximum number of visible slices. Determines polygon subdivision density. If the number of enabled entries exceeds this value, the actual enabled count takes precedence.

public virtual int MaxEntryCount { get; set; }

Property Value

int

Selection

The currently selected entry. Returns null/default if nothing is selected.

public virtual TContainer Selection { get; }

Property Value

TContainer

SelectionColor

Color used for the currently selected slice.

public virtual Color SelectionColor { get; set; }

Property Value

Color

SelectionIndex

Index of the currently selected entry in EntryList. -1 if no selection.

public virtual int SelectionIndex { get; protected set; }

Property Value

int

UseGestureInput

When true, selection is driven by drag gestures instead of absolute cursor position.

public virtual bool UseGestureInput { get; set; }

Property Value

bool

Methods

Clear()

Removes all entries and clears both selection and highlight.

public override void Clear()

ClearHighlight()

Clears only the highlight (cursor/gesture hover).

public void ClearHighlight()

ClearSelection()

Clears only the current selection.

public void ClearSelection()

SetHighlight(TContainer)

Highlights the given entry if it exists in the collection.

public void SetHighlight(TContainer container)

Parameters

container TContainer

SetHighlightAt(int)

Highlights the entry at the specified index (clamped to valid range).

public void SetHighlightAt(int index)

Parameters

index int

SetSelection(TContainer)

Sets the selection to the given entry if it exists in the collection.

public void SetSelection(TContainer container)

Parameters

container TContainer

SetSelectionAt(int)

Sets the selection to the entry at the specified index (clamped to valid range).

public void SetSelectionAt(int index)

Parameters

index int