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>Public Members
Section titled “Public Members”| 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. |
See Also
Section titled “See Also”- record HudElement
- namespace Stellar.Abstractions.Services