mirror of
https://github.com/Stone-Red-Code/RemSox.git
synced 2026-09-07 15:56:31 +02:00
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:
@@ -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()
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user