Add dirty UI element visualization to UISystem, fix Frame being constantly updated.

This commit is contained in:
2025-06-24 23:29:26 +02:00
parent b2f3e1c351
commit d44341974f
5 changed files with 60 additions and 31 deletions

View File

@@ -127,22 +127,22 @@ public class TestGame : Game
private ResourceRef<Sound> _sound;
private ResourceRef<Texture2d> _icon;
private FlexContainer _container = new(minimumSize: new Rect(64.0f, 64.0f), new())
{
Anchor = Anchor.Center,
Size = new Rect(500, 300),
Direction = FlexDirection.Column,
Justify = JustifyContent.Start,
Align = AlignItems.Center,
Wrap = true,
Gap = 10f
};
// private FlexContainer _container = new(minimumSize: new Rect(64.0f, 64.0f), new())
// {
// Anchor = Anchor.Center,
// Size = new Rect(500, 300),
// Direction = FlexDirection.Column,
// Justify = JustifyContent.Start,
// Align = AlignItems.Center,
// Wrap = true,
// Gap = 10f
// };
private Frame _frame = new();
// private VerticalContainer _container = new(new Rect(128.0f, 64.0f), new(), 16)
// {
// ConfineToContents = true,
// Anchor = Anchor.CenterLeft,
// AnchorOffset = new Vector2(0.5f, 0.0f)
// };
private VerticalContainer _container = new(new Rect(128.0f, 64.0f), new(), 16)
{
ConfineToContents = true,
Anchor = Anchor.CenterLeft,
AnchorOffset = new Vector2(0.5f, 0.0f)
};
}