Replace string element render types with RenderCommandType enum, decompose UI elements (Button, CheckBox, chrome) into drawing primitives via ToPrimitives(), emit per-element commands on flush, and move composite into IRenderSource.

This commit is contained in:
Stone_Red
2026-06-16 01:11:01 +02:00
parent 1355fa06b8
commit e90e9ab163
16 changed files with 850 additions and 187 deletions
+21
View File
@@ -0,0 +1,21 @@
using RemSox.Networking;
namespace RemSox.UI.GUI.Rendering;
public sealed class NetworkRenderSource(TcpRpcServer server) : IRenderSource
{
private const string MessageType = "RenderCmd";
public void Render(IEnumerable<RenderCommand> commands)
{
foreach (RenderCommand cmd in commands)
{
byte[] data = cmd.ToBytes();
_ = server.SendRawToAll(MessageType, data);
}
}
public void Composite()
{
}
}