Skip to content
Version 2.11.0
↓ Get the launcher

DropdownElement record

Compact dropdown for a small, fixed set of mutually-exclusive choices (e.g. a mode selector) — a reusable replacement for a click-to-cycle button. The trigger shows the current option (caption + ▾); a click opens a themed floating option list that floats above the window’s scroll clip. Picking an option calls OnSelect with its index; the list dismisses on pick, outside-click, or Esc.

public record DropdownElement : IEquatable<HudElement>
name description
DropdownElement(…) Compact dropdown for a small, fixed set of mutually-exclusive choices (e.g. a mode selector) — a reusable replacement for a click-to-cycle button. The trigger shows the current option (caption + ▾); a click opens a themed floating option list that floats above the window’s scroll clip. Picking an option calls OnSelect with its index; the list dismisses on pick, outside-click, or Esc.
OnSelect { get; set; } Invoked with the picked option’s index.
Options { get; set; } Option captions in order; the index passed to OnSelect indexes this list.
Selected { get; set; } Current selected index (poll-diffed); out of range → empty caption.
Width { get; set; } Fixed trigger width in px; 0 → sized to the current caption like a normal button.