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
TContainerContainer type that wraps each entry's UI element and provides selection/association data.
TElementThe 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>IReadOnlyCollection<TContainer>IEnumerable<TContainer>
- Derived
- Inherited Members
Constructors
RadialSelectionBox(HudParentBase)
public RadialSelectionBox(HudParentBase parent = null)
Parameters
parentHudParentBase
Properties
BackgroundColor
Background color of the entire radial wheel.
public virtual Color BackgroundColor { get; set; }
Property Value
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
EnabledCount
Number of entries that are currently enabled and visible on the wheel.
public virtual int EnabledCount { get; protected set; }
Property Value
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
HighlightIndex
Index of the currently highlighted entry in EntryList. -1 if nothing highlighted.
public virtual int HighlightIndex { get; protected set; }
Property Value
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
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
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
SelectionIndex
Index of the currently selected entry in EntryList. -1 if no selection.
public virtual int SelectionIndex { get; protected set; }
Property Value
UseGestureInput
When true, selection is driven by drag gestures instead of absolute cursor position.
public virtual bool UseGestureInput { get; set; }
Property Value
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
containerTContainer
SetHighlightAt(int)
Highlights the entry at the specified index (clamped to valid range).
public void SetHighlightAt(int index)
Parameters
indexint
SetSelection(TContainer)
Sets the selection to the given entry if it exists in the collection.
public void SetSelection(TContainer container)
Parameters
containerTContainer
SetSelectionAt(int)
Sets the selection to the entry at the specified index (clamped to valid range).
public void SetSelectionAt(int index)
Parameters
indexint