Table of Contents

Class ScrollSelectionBoxBase<TContainer, TElement>

Namespace
RichHudFramework.UI
Assembly
RichHudClient.dll

Abstract selection box that uses a ScrollBox<TElementContainer, TElement> as its backing list. Supports scrolling (mouse wheel + scrollbar).

public abstract class ScrollSelectionBoxBase<TContainer, TElement> : SelectionBoxBase<ScrollBox<TContainer, TElement>, TContainer, TElement>, IReadOnlyHudElement, IReadOnlyHudNode, IReadOnlyHudParent, IEntryBox<TContainer, TElement>, IEnumerable<TContainer>, IEnumerable, IValueControl<TContainer>, IValueControl, IClickableElement, IFocusableElement where TContainer : class, ISelectionBoxEntry<TElement>, new() where TElement : HudElementBase, IMinLabelElement

Type Parameters

TContainer

Container type that wraps each list entry and implements ISelectionBoxEntry<TElement>

TElement

The actual UI element displayed for each entry (must have at least a minimal label)

Inheritance
SelectionBoxBase<ScrollBox<TContainer, TElement>, TContainer, TElement>
ScrollSelectionBoxBase<TContainer, TElement>
Implements
IEntryBox<TContainer, TElement>
IEnumerable<TContainer>
IValueControl<TContainer>
Inherited Members

Constructors

ScrollSelectionBoxBase(HudParentBase)

public ScrollSelectionBoxBase(HudParentBase parent = null)

Parameters

parent HudParentBase

Properties

Color

Background color of the scrollable area.

public Color Color { get; set; }

Property Value

Color

EnableScrolling

If true, scrolling via mouse wheel and the scrollbar is enabled.

public virtual bool EnableScrolling { get; set; }

Property Value

bool

HighlightWidth

Width available for the highlight/selection overlay (accounts for padding and scrollbar).

protected override float HighlightWidth { get; }

Property Value

float

UseSmoothScrolling

If true, enables smooth scrolling and clips content to the visible range.

public virtual bool UseSmoothScrolling { get; set; }

Property Value

bool

Methods

HandleInput(Vector2)

Scrolls the view when navigation moves the highlight outside the currently visible range.

protected override void HandleInput(Vector2 cursorPos)

Parameters

cursorPos Vector2