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
+18
View File
@@ -87,6 +87,24 @@ public class TcpRpcServer(IPacketCrypto? crypto = null) : TcpRpcBase(crypto)
return Task.WhenAll(sendTasks);
}
/// <summary> Broadcasts raw binary payload to all connected clients. </summary>
public Task SendRawToAll(string type, byte[] payload)
{
List<Task> sendTasks = [];
foreach (TcpConnection conn in connections.Keys)
{
sendTasks.Add(SendRaw(conn, new TcpMessage
{
Type = type,
RequestId = Guid.NewGuid().ToString(),
Payload = payload
}));
}
return Task.WhenAll(sendTasks);
}
protected override void OnConnectionClosed(TcpConnection conn)
{
_ = connections.TryRemove(conn, out _);