ButtonElement record
Clickable button. Enabled null = always enabled. Style null = the chrome’s active IChromeStyle default. Active (poll-diffed) renders the accent/filled look when true — used for active tab / toggle-button highlighting. Width > 0 fixes the button width (it can’t grow/shrink) and WRAPS its label — use for right-aligned cells (e.g. a hotkey binding) that must never overflow the row regardless of font metrics. Icon (optional PNG) renders a leading icon INSIDE the button, co-centred with the label by the button’s own layout (so icon↔label alignment can’t drift with font metrics — used by the Settings hub’s iconed tabs).
public record ButtonElement : IEquatable<HudElement>Public Members
Section titled “Public Members”| name | description |
|---|---|
| ButtonElement(…) | Clickable button. Enabled null = always enabled. Style null = the chrome’s active IChromeStyle default. Active (poll-diffed) renders the accent/filled look when true — used for active tab / toggle-button highlighting. Width > 0 fixes the button width (it can’t grow/shrink) and WRAPS its label — use for right-aligned cells (e.g. a hotkey binding) that must never overflow the row regardless of font metrics. Icon (optional PNG) renders a leading icon INSIDE the button, co-centred with the label by the button’s own layout (so icon↔label alignment can’t drift with font metrics — used by the Settings hub’s iconed tabs). |
| Active { get; set; } | |
| Enabled { get; set; } | |
| Icon { get; set; } | |
| Label { get; set; } | |
| OnClick { get; set; } | |
| OnClickWithRect { get; set; } | When non-null, invoked on click with the button’s screen rect (top-left origin, same coordinate space as Rect). Use to anchor a popup to the button’s actual position. |
| Style { get; set; } | |
| Width { get; set; } |
See Also
Section titled “See Also”- record HudElement
- namespace Stellar.Abstractions.Services