mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
update protocol
now resembles the changes to the protocol I made
This commit is contained in:
+53
-13
@@ -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"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "selected",
|
||||||
|
"type": "size_t",
|
||||||
|
"description": "The index of the selected item"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Server to client
|
|
||||||
"type": "ui_changed",
|
"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",
|
"name": "UIElements",
|
||||||
"type": "type"
|
"type": "List<UIElements>",
|
||||||
// ,...
|
"description": "List of UI elements"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user