Dewdman42 Posted August 2, 2017 Share Posted August 2, 2017 I've seen several references to "checkbox" parameters, but I can't find any information about it with the Logic effects manual. Is this a hidden parameter type? Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted August 3, 2017 Author Share Posted August 3, 2017 Well I just tried a PluginParameter type "checkbox" and it does as is expected, makes a checkbox. Since its not apparently documented anywhere I am unsure if there are any other optional arguments for it, I doubt it, but just asking. Sounds like a "menu" with only two items on it somehow automagically turns into two linked radio buttons, which is equally effective... I didn't see this documented anywhere either, just kind of exploring... Quote Link to comment Share on other sites More sharing options...
Nseruame Posted August 5, 2017 Share Posted August 5, 2017 That got me in the past: PluginParameters = [ { type : "menu" , name: "Menu/Checkbox" , defaultValue: 0 , valueStrings: [ // "Off" first, "On" last "Off", "On" ] } , { type : "menu" , name: "Menu/Toggle" , defaultValue: 0 , valueStrings: [ // "On" first, "Off" last "On", "Off" ] } , { type : "menu" , name: "Menu/NotACheckbox" , defaultValue: 0 , valueStrings: [ // add spaces to strings to avoid a checkbox "Off ", "On " ] } ] With checkbox, setting its defaultValue to 1 makes it ticked, setting it to 0, unticked... There are a few more mutant parameters lurking in there too if I recall correctly. Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted August 5, 2017 Author Share Posted August 5, 2017 Oh yea? What other mutant parameters? Good stuff to know, wish it was documented. Quote Link to comment Share on other sites More sharing options...
Nseruame Posted August 5, 2017 Share Posted August 5, 2017 You know what? I'm regretting writing that without thinking! I've searched through my project files to no avail. I'll post it here when I find it. Basically its a slider that cannot be moved. This is annoying: PluginParameters = [ { type: "text", name: "BLINK" } , { type: "checkbox", name: "BLINK", defaultValue: 1 } ] ParameterChanged = ( index, value ) => { let param = PluginParameters[ index ] if ( param.hidden ) { PluginParameters[ 0 ].name = " " param.hidden = false } else { PluginParameters[ 0 ].name = "BLINK" param.hidden = true } UpdatePluginParameters() } Quote Link to comment Share on other sites More sharing options...
Unheardofski Posted August 18, 2017 Share Posted August 18, 2017 If you make a "menu" parameter with the valueStrings in the arguments you get a dual radiobutton thingy: *edited to say this is only the case as long you have a valueString array length of 2 var PluginParameters = [{name:"Poop", type:"menu", valueStrings: ["Yes", "Not now"]}]; function HandleMIDI(event) { e.flush(); } example Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.