Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

Setting up a control window using ControlP5

$
0
0

I'm wondering why a ControlP5 slider always ends up on my main canvas when I need it to go on the special control window (which I never get to see).

Has anyone had this issue before? I'm wanting to have a control window setup which would have sliders to control graphics on the main canvas, but in a separate window.

Here's my code - thanks for any ideas people. (Still can't get this code to output right in these forums - ctrl & O not working again for some reason).

`import controlP5.*;

//Declare Controls ControlP5 controlP5; ControlWindow myControlWindow; //initialize control window Controller slider; //initialize slider

//Setup

void setup() { //Initalize Main Canvas size(1480, 360);

//Initialize ControlP5 and Control Window controlP5 = new ControlP5(this);

myControlWindow = controlP5.addControlWindow("Control Window", 200, 200, 480, 360);

//Initialize Controls slider = controlP5.addSlider("X", 0, 30, 15, 88, 70, 320, 24);

}

//Draw

void draw() {

}`


Viewing all articles
Browse latest Browse all 2896

Trending Articles