Table of Contents

Namespace Thunder.MonoGame.Avalonia.Controls

Classes

AvaloniaInput

Public read-only facade over the Avalonia input state. Use this from game code to discover which viewport currently has pointer focus, allowing a single Game to route per-update input to the correct sub-region when multiple SubViewGameControl viewports share the same game instance.

MonoGameControl

Avalonia control that hosts a MonoGame rendering surface via OpenGL. Inherits Avalonia.OpenGL.Controls.OpenGlControlBase so Avalonia manages the GL context lifecycle; each compositor frame triggers OnOpenGlRender(GlInterface, int) which calls game.Tick().

SubViewGameControl

Avalonia control that represents an in-game sub-viewport region. Place alongside a MonoGameControl in the layout tree and set HostControl to wire the two together. The game renders into this region via the Draw delegate, which is invoked after each game.Tick() inside the host control's render callback.

SubViewportDrawContext

Context passed to the Draw delegate once per render frame. Contains the viewport rectangle the sub-view occupies, in game backbuffer coordinates. The game should set GraphicsDevice.Viewport (and optionally ScissorRectangle) to this rectangle before drawing sub-view content.

latest ▼