From 97700658e118cd452dd93e0244bd3af3ec827f27 Mon Sep 17 00:00:00 2001 From: Sander Speetjens Date: Thu, 12 Feb 2026 08:50:58 +0100 Subject: [PATCH] update protocol now resembles the changes to the protocol I made --- protocol.jsonc | 66 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 53 insertions(+), 13 deletions(-) diff --git a/protocol.jsonc b/protocol.jsonc index e213d50..93280f9 100644 --- a/protocol.jsonc +++ b/protocol.jsonc @@ -7,7 +7,7 @@ "parameters": [ { "name": "id", - "type": "string", + "type": "size_t", "description": "The id of the UI element" } ], @@ -98,31 +98,71 @@ [ { "type": "clicked", - "id": "name" + "description": "Someone clicked on a UI elements", + "parameters": [ + { + "name": "id", + "type": "size_t", + "description": "The id of the UI element" + } + ] }, { "type": "value_changed", - "id": "name", - "value": 0 + "description": "Someone changed a value on a UI elements", + "parameters": [ + { + "name": "id", + "type": "size_t", + "description": "The id of the UI element" + }, + { + "name": "value", + "type": "double", + "description": "The value that changed" + } + ] }, { "type": "text_changed", - "id": "name", - "text": "text" + "description": "Someone changed text on a UI elements", + "parameters": [ + { + "name": "id", + "type": "size_t", + "description": "The id of the UI element" + }, + { + "name": "text", + "type": "string", + "description": "The text that changed" + } + ] }, { "type": "selected", - "id": "name", - "item": "name" + "description": "Someone changed selection on a UI elements", + "parameters": [ + { + "name": "id", + "type": "size_t", + "description": "The id of the UI element" + }, + { + "name": "selected", + "type": "size_t", + "description": "The index of the selected item" + } + ] }, { - // Server to client "type": "ui_changed", - "UI_elements": [ + "description": "A message from Server to client to notify that the UI changed with the changed UI elements", + "parameters": [ { - "id": "name", - "type": "type" - // ,... + "name": "UIElements", + "type": "List", + "description": "List of UI elements" } ] }