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

add button2 with new multiple events per ID

parent cf98c709
No related branches found
No related tags found
No related merge requests found
{
"svg": "button.svg",
"items": [
{
"id": "button_%0",
"attr": "visibility",
"value": "IF button=%0 THEN \"visible\" ELSE \"hidden\" END",
"repeat": [ "TRUE", "FALSE" ]
},
{
"id": "button",
"attr": "fill",
"value": "IF button=TRUE THEN \"green\" ELSE \"red\" END"
}
],
"events": [
{
"id": "button",
"event": "press_button",
"hovers": [{ "attr":"stroke-width", "enter":"6", "leave":"1"}]
},
{
"id": "button",
"event": "release_button",
"hovers": [ { "attr":"opacity", "enter":"0.8", "leave":"1.0"}]
}
]
}
MACHINE button2
// a version of button with just two events
DEFINITIONS
"LibraryMeta.def";
VISB_JSON_FILE == "button2.json"
VARIABLES
button
INVARIANT
button:BOOL
INITIALISATION
button := FALSE
OPERATIONS
press_button = PRE button=FALSE THEN
button:=TRUE
END;
release_button = PRE button=TRUE THEN
button:=FALSE
END
END
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment