Skip to content
Snippets Groups Projects
Commit 490636fa authored by Michael Leuschel's avatar Michael Leuschel
Browse files

use include attribute

parent 4c456338
No related branches found
No related tags found
No related merge requests found
{ {
"svg": "button.svg", "svg": "button.svg",
"include": "button_extra.json",
"items": [ "items": [
{ {
"id": "button", "id": "button",
...@@ -11,12 +12,6 @@ ...@@ -11,12 +12,6 @@
"attr": "stroke-width", "attr": "stroke-width",
"value": "IF ENABLED(\"press_button\") THEN 6 ELSE 1 END", "value": "IF ENABLED(\"press_button\") THEN 6 ELSE 1 END",
"ignore": "is now used in hover below" "ignore": "is now used in hover below"
},
{
"id": "button_%0",
"attr": "visibility",
"value": "IF button=%0 THEN \"visible\" ELSE \"hidden\" END",
"repeat": [ "TRUE", "FALSE" ]
} }
], ],
"events": [ "events": [
...@@ -25,19 +20,6 @@ ...@@ -25,19 +20,6 @@
"event": "toggle_button", "event": "toggle_button",
"hovers": [{ "attr":"stroke-width", "enter":"6", "leave":"1"}, "hovers": [{ "attr":"stroke-width", "enter":"6", "leave":"1"},
{ "attr":"opacity", "enter":"0.8", "leave":"1.0"}] { "attr":"opacity", "enter":"0.8", "leave":"1.0"}]
},
{
"id": "button_TRUE",
"event": "toggle_button",
"hovers": [{ "attr":"stroke-width", "enter":"3", "leave":"1", "id":"button"},
{ "attr":"opacity", "enter":"0.5", "leave":"0.8"}]
},
{
"id": "button_FALSE",
"event": "set_button",
"predicates" : ["newVal = bool(%shiftKey=FALSE)"],
"hovers": [{ "attr":"stroke-width", "enter":"5", "leave":"1", "id":"button"},
{ "attr":"opacity", "enter":"0.85", "leave":"1.0"}]
} }
] ]
} }
{
"svg": "button.svg",
"comment": "treatment of button_TRUE and button_FALSE extra buttons",
"items": [
{
"id": "button_%0",
"attr": "visibility",
"value": "IF button=%0 THEN \"visible\" ELSE \"hidden\" END",
"repeat": [ "TRUE", "FALSE" ]
}
],
"events": [
{
"id": "button_TRUE",
"event": "toggle_button",
"hovers": [{ "attr":"stroke-width", "enter":"3", "leave":"1", "id":"button"},
{ "attr":"opacity", "enter":"0.5", "leave":"0.8"}]
},
{
"id": "button_FALSE",
"event": "set_button",
"optional": true,
"predicates" : ["newVal = bool(%shiftKey=FALSE)"],
"hovers": [{ "attr":"stroke-width", "enter":"5", "leave":"1", "id":"button"},
{ "attr":"opacity", "enter":"0.85", "leave":"1.0"}]
}
]
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment