Bug fix
Functions implemented for menus
This commit is contained in:
parent
421cbf13f5
commit
6409cbf759
@ -486,9 +486,15 @@ function addMenu(index, parent, name, id, position, value, array, type)
|
||||
,
|
||||
"oninput" : "drawsocket.send({" + "djster" + ": {player: " + (index + 1) + ", " + id + ": this.value}})"
|
||||
}
|
||||
];
|
||||
];
|
||||
var obj2 = {
|
||||
"id" : id + "_value" + "_" + index,
|
||||
"args" : "v",
|
||||
"body" : "document.getElementById('" + id + "_" + index + "').value = v;document.getElementById('" + id + "_num" + "_" + index + "').value = v"
|
||||
};
|
||||
elements.push(obj[0]);
|
||||
elements.push(obj[1]);
|
||||
body.push(obj2);
|
||||
}
|
||||
|
||||
function addCheckbox(index, parent, name, id, position, checked, type)
|
||||
@ -689,7 +695,7 @@ function param()
|
||||
var index1 = d.get("player");
|
||||
var msg = keys.indexOf("player") ? keys[0] : keys[1];
|
||||
var val = d.get(msg);
|
||||
//post("what?", JSON.stringify(checkboxes), index1, msg, val, "\n");
|
||||
post("what?", msg + "_value_" + (index1 - 1), val, "\n");
|
||||
//for range sliders (calc pulse_length, tonic_pitch, pitch_range)
|
||||
switch (msg) {
|
||||
//menus
|
||||
@ -698,6 +704,7 @@ function param()
|
||||
case "instrument" :
|
||||
case "scale" :
|
||||
case "meter" :
|
||||
/*
|
||||
obj["*"] = {
|
||||
"key" : "html",
|
||||
"val" : {
|
||||
@ -705,6 +712,14 @@ function param()
|
||||
"selected" : true
|
||||
}
|
||||
};
|
||||
*/
|
||||
obj["*"] = {
|
||||
"key" : "function",
|
||||
"val" : {
|
||||
"id" : msg + "_value_" + (index1 - 1),
|
||||
"call" : val
|
||||
}
|
||||
};
|
||||
break;
|
||||
//checkboxes
|
||||
case "play" :
|
||||
|
@ -39,6 +39,18 @@
|
||||
"subpatcher_template" : "",
|
||||
"assistshowspatchername" : 0,
|
||||
"boxes" : [ {
|
||||
"box" : {
|
||||
"id" : "obj-56",
|
||||
"maxclass" : "button",
|
||||
"numinlets" : 1,
|
||||
"numoutlets" : 1,
|
||||
"outlettype" : [ "bang" ],
|
||||
"parameter_enable" : 0,
|
||||
"patching_rect" : [ 92.0, 166.0, 24.0, 24.0 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"box" : {
|
||||
"id" : "obj-54",
|
||||
"maxclass" : "live.line",
|
||||
@ -235,7 +247,7 @@
|
||||
}
|
||||
,
|
||||
"classnamespace" : "box",
|
||||
"rect" : [ 549.0, 148.0, 1301.0, 761.0 ],
|
||||
"rect" : [ 177.0, 148.0, 1301.0, 761.0 ],
|
||||
"bglocked" : 0,
|
||||
"openinpresentation" : 0,
|
||||
"default_fontsize" : 12.0,
|
||||
@ -7835,7 +7847,7 @@
|
||||
"numinlets" : 2,
|
||||
"numoutlets" : 1,
|
||||
"outlettype" : [ "" ],
|
||||
"patching_rect" : [ 113.0, 122.0, 35.0, 22.0 ],
|
||||
"patching_rect" : [ 127.0, 116.0, 35.0, 22.0 ],
|
||||
"text" : "clear"
|
||||
}
|
||||
|
||||
@ -7919,7 +7931,7 @@
|
||||
"numinlets" : 2,
|
||||
"numoutlets" : 5,
|
||||
"outlettype" : [ "dictionary", "", "", "", "" ],
|
||||
"patching_rect" : [ 169.0, 177.0, 61.0, 22.0 ],
|
||||
"patching_rect" : [ 127.0, 173.0, 61.0, 22.0 ],
|
||||
"saved_object_attributes" : {
|
||||
"embed" : 0,
|
||||
"legacy" : 0,
|
||||
@ -7995,7 +8007,7 @@
|
||||
"outlettype" : [ "", "" ],
|
||||
"patching_rect" : [ 169.0, 116.0, 118.0, 22.0 ],
|
||||
"saved_object_attributes" : {
|
||||
"filename" : "djster_webcontrol",
|
||||
"filename" : "djster_webcontrol.js",
|
||||
"parameter_enable" : 0
|
||||
}
|
||||
,
|
||||
@ -8142,7 +8154,7 @@
|
||||
}
|
||||
, {
|
||||
"patchline" : {
|
||||
"destination" : [ "obj-51", 0 ],
|
||||
"destination" : [ "obj-51", 1 ],
|
||||
"order" : 1,
|
||||
"source" : [ "obj-10", 0 ]
|
||||
}
|
||||
@ -8465,6 +8477,13 @@
|
||||
"source" : [ "obj-5", 0 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"patchline" : {
|
||||
"destination" : [ "obj-1", 0 ],
|
||||
"source" : [ "obj-51", 0 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"patchline" : {
|
||||
@ -8472,6 +8491,13 @@
|
||||
"source" : [ "obj-52", 0 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"patchline" : {
|
||||
"destination" : [ "obj-51", 0 ],
|
||||
"source" : [ "obj-56", 0 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"patchline" : {
|
||||
|
Loading…
Reference in New Issue
Block a user