update official website example

This commit is contained in:
Nic Barker 2025-01-26 15:27:54 +13:00
parent a2c1b860a6
commit f9b0bef35a
3 changed files with 14 additions and 2 deletions

View File

@ -96,6 +96,11 @@
{name: 'length', type: 'uint32_t' }, {name: 'length', type: 'uint32_t' },
{name: 'chars', type: 'uint32_t' }, {name: 'chars', type: 'uint32_t' },
]}; ]};
let stringSliceDefinition = { type: 'struct', members: [
{name: 'length', type: 'uint32_t' },
{name: 'chars', type: 'uint32_t' },
{name: 'baseChars', type: 'uint32_t' },
]};
let borderDefinition = { type: 'struct', members: [ let borderDefinition = { type: 'struct', members: [
{name: 'width', type: 'uint32_t'}, {name: 'width', type: 'uint32_t'},
{name: 'color', ...colorDefinition}, {name: 'color', ...colorDefinition},
@ -155,7 +160,8 @@
{ name: 'height', type: 'float' }, { name: 'height', type: 'float' },
]}, ]},
{ name: 'config', type: 'uint32_t'}, { name: 'config', type: 'uint32_t'},
{ name: 'text', ...stringDefinition }, { name: 'text', ...stringSliceDefinition },
{ name: 'zIndex', type: 'int32_t' },
{ name: 'id', type: 'uint32_t' }, { name: 'id', type: 'uint32_t' },
{ name: 'commandType', type: 'uint32_t', }, { name: 'commandType', type: 'uint32_t', },
] ]

View File

@ -96,6 +96,11 @@
{name: 'length', type: 'uint32_t' }, {name: 'length', type: 'uint32_t' },
{name: 'chars', type: 'uint32_t' }, {name: 'chars', type: 'uint32_t' },
]}; ]};
let stringSliceDefinition = { type: 'struct', members: [
{name: 'length', type: 'uint32_t' },
{name: 'chars', type: 'uint32_t' },
{name: 'baseChars', type: 'uint32_t' },
]};
let borderDefinition = { type: 'struct', members: [ let borderDefinition = { type: 'struct', members: [
{name: 'width', type: 'uint32_t'}, {name: 'width', type: 'uint32_t'},
{name: 'color', ...colorDefinition}, {name: 'color', ...colorDefinition},
@ -155,7 +160,8 @@
{ name: 'height', type: 'float' }, { name: 'height', type: 'float' },
]}, ]},
{ name: 'config', type: 'uint32_t'}, { name: 'config', type: 'uint32_t'},
{ name: 'text', ...stringDefinition }, { name: 'text', ...stringSliceDefinition },
{ name: 'zIndex', type: 'int32_t' },
{ name: 'id', type: 'uint32_t' }, { name: 'id', type: 'uint32_t' },
{ name: 'commandType', type: 'uint32_t', }, { name: 'commandType', type: 'uint32_t', },
] ]