This is a little hard coded but it works
createButton({
"text":"Road",
"id":"road",
"otype":"child",
"childOf":document.getElementById("park"),
"click": function() {
selectedBuilding = "Road";
},
"clickEvent": "mousedown",
"mouseOver": function() {
},
"corner":"+",
"verticalEdge": "-",
"sideEdge":"|"
});
createText({
"text":"Selected Building: ",
"update": function() {
return "Selected Building: " + selectedBuilding;
},
"otype":"child",
"childOf":document.getElementById("road")
});
And the parent before a long chain:
createButton({
"text":"Build",
"id":"build",
"otype":"parent",
"click": function() {
},
"position": {
"x":"10",
"y":"300"
},
"clickEvent": "mousedown",
"mouseOver": function() {
},
"corner": "o",
"verticalEdge": "_",
"sideEdge":"|"
});