MonoGame.Forms 3.2.0 Released!
Added
- EventHandler for ControlStates and ComponentStates, so that it’s possible to adapt to certain editor events.
Example
Globally apply an antialising render target:
protected override void Initialize()
{
ControlState += ApplyAntialising;
}
private void ApplyAntialising(object? sender, ControlStateEventArgs e)
{
if (e.ControlsState == NET.ControlState.StartDraw)
{
Editor.BeginAntialising();
}
else if (e.ControlsState == NET.ControlState.EndDraw)
{
Editor.EndAntialising();
}
}
This is espacially useful when working with Components. Before this update it was only possible to have either a MonoGame.Forms.Control or one GameComponent at the same time on the antialising render target or rather on render targets in general.
Of course you can use this new event system for many more things!
Have fun :))
PS: This update is only available on the Net6.0 version of the library.