update protocol

now resembles the changes to the protocol I made
This commit is contained in:
2026-02-14 14:32:48 +01:00
parent 5082468b11
commit 97700658e1
+54 -14
View File
@@ -7,7 +7,7 @@
"parameters": [ "parameters": [
{ {
"name": "id", "name": "id",
"type": "string", "type": "size_t",
"description": "The id of the UI element" "description": "The id of the UI element"
} }
], ],
@@ -98,31 +98,71 @@
[ [
{ {
"type": "clicked", "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", "type": "value_changed",
"id": "name", "description": "Someone changed a value on a UI elements",
"value": 0 "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", "type": "text_changed",
"id": "name", "description": "Someone changed text on a UI elements",
"text": "text" "parameters": [
{
"name": "id",
"type": "size_t",
"description": "The id of the UI element"
},
{
"name": "text",
"type": "string",
"description": "The text that changed"
}
]
}, },
{ {
"type": "selected", "type": "selected",
"id": "name", "description": "Someone changed selection on a UI elements",
"item": "name" "parameters": [
{
"name": "id",
"type": "size_t",
"description": "The id of the UI element"
}, },
{ {
// Server to client "name": "selected",
"type": "ui_changed", "type": "size_t",
"UI_elements": [ "description": "The index of the selected item"
}
]
},
{ {
"id": "name", "type": "ui_changed",
"type": "type" "description": "A message from Server to client to notify that the UI changed with the changed UI elements",
// ,... "parameters": [
{
"name": "UIElements",
"type": "List<UIElements>",
"description": "List of UI elements"
} }
] ]
} }