Closed stolsky closed 2 years ago
replace SHOW/HIDE by states:
example:
{
"id": "eBlo",
"name": "par1Blo01",
"states": [
{
"id": 1,
"type": "Use",
"visible": false,
"back": "93,48,26",
"left": [
{"text": "par1Blo03", "stmt": ["SELF 0", "eMet SHOW", "eBoo 2", "eSpi 2"]}
],
"right": [
{"text": "par1Blo02"}
]
}
]
},
statement: "stmt": ["eBlo SHOW"]
{
"id": "eBlo",
"name": "par1Blo01",
"type": "Use",
"back": "93,48,26",
"states": [
{
"id": 1,
"visible": false
},
{
"id": 2,
"visible": true,
"left": [
{"text": "par1Blo03", "stmt": ["SELF 0", "eMet 2", "eBoo 2", "eSpi 2"]}
],
"right": [
{"text": "par1Blo02"}
]
}
]
},
statement: "stmt": ["eBlo 2"]
for better readability of the code:
"states": [{
{
"id": 1,
"aka": "SHOW",
...
}]
statement: "stmt": ["eBlo SHOW"]
put only properties that change between state transitions inside state declarations-> first state = init"left": [ {"stmt": ["SELF USE"]} ],
of items"left": [ {"stmt": ["SELF USE"]} ],
to items if not exists to make them usableIF there is a "left script" THAN overwrite default usage/combinationSELF INCRIGHT
orSELF INCLEFT
statement to increment left/right action indexSELF INCRIGHT
orSELF INCLEFT
correctly like prior with "dupe"remove SHOW and HIDE from statements, replacing them with states respectivelyadd alias property to state's property of element as option to create more readable statements