monogame-ui-controls

Installation
SKILL.md

MonoGame UI Controls — Component Library

Ready-to-use UI components built on UIElement from monogame-ui-core. For layout positioning, see monogame-ui-layout. For click/hover events, see monogame-ui-interaction. For complete code templates, read references/ui-controls.md.

Assumed Contract

Controls in this skill extend UIElement (partial class from monogame-ui-core). They implement Measure/Arrange from monogame-ui-layout and receive pointer events via the hit test/bubbling system from monogame-ui-interaction. If you need gamepad navigation, assign neighbor IDs and register with UIFocusManager from monogame-ui-focus.

RasterizerState for scissor clipping is created once (in the constructor or LoadContent) — never inside Draw().

Label

Wraps SpriteFont.MeasureString to auto-size and supports horizontal/vertical alignment.

Measure: Call font.MeasureString(text), store as DesiredSize. Respect FixedSize if set.
Draw: Call spriteBatch.DrawString — position computed from Bounds + alignment offset.

Installs
14
GitHub Stars
2
First Seen
May 20, 2026
monogame-ui-controls — alca259/monogame-skills