mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-24 20:12:23 +00:00
25 lines
669 B
C#
25 lines
669 B
C#
using Microsoft.Xna.Framework;
|
|
|
|
namespace MonoGame.Extended.Gui.Controls
|
|
{
|
|
public class Canvas : LayoutControl
|
|
{
|
|
public Canvas()
|
|
{
|
|
}
|
|
|
|
protected override void Layout(IGuiContext context, Rectangle rectangle)
|
|
{
|
|
foreach (var control in Items)
|
|
{
|
|
var actualSize = control.CalculateActualSize(context);
|
|
PlaceControl(context, control, control.Position.X, control.Position.Y, actualSize.Width, actualSize.Height);
|
|
}
|
|
}
|
|
|
|
public override Size GetContentSize(IGuiContext context)
|
|
{
|
|
return new Size();
|
|
}
|
|
}
|
|
} |