Merge branch 'main' into standard-renderer

This commit is contained in:
2025-06-24 21:38:38 +02:00
19 changed files with 299 additions and 179 deletions

View File

@@ -56,7 +56,9 @@ public class TestGame : Game
Input.AddInputMapping("reload", new IInputAction[] { new KeyInputAction(KeyboardKey.R) });
_emitterId = _particleSystem.CreateEmitter(Renderer.WindowSize / 2, _fireEffect);
_uiSystem.AddElement(_container);
_frame.AddChild(_container);
_uiSystem.AddElement(_frame);
}
@@ -78,6 +80,12 @@ public class TestGame : Game
var lastChild = _container.Children.Last();
_container.RemoveChild(lastChild);
}
if (Input.IsMouseButtonDown(MouseButton.Left))
{
var mousePos = Input.GetMousePosition();
_frame.Size = new Rect(mousePos.X, mousePos.Y);
}
}
protected override void Render(double deltaTime)
@@ -121,12 +129,20 @@ public class TestGame : Game
private FlexContainer _container = new(minimumSize: new Rect(64.0f, 64.0f), new())
{
ConfineToContents = false,
Anchor = Anchor.Center,
Size = new Rect(500, 300),
Direction = FlexDirection.Row,
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)
// };
}