Setting a second window undecorated with controlP5 problem?
in
Contributed Library Questions
•
2 years ago
Hello, I am having a problem making a secondary window I made have no decoration. I originally scripted it on a mac and it worked fine but when I took my flash drive and ran the same script on windows 7 my second window shrank to the default really tiny square thing. I have no idea why and would seriously appreciate if someone could help me. The code is below.
Thanks,
TheGamersHaven
- import controlP5.*;
- int cWidth = 400;
- Button b;
- ControlP5 controlP5;
- ControlWindow controlWindow;
- void setup() {
- size(screen.width-cWidth,screen.height,P2D);
- frame.setLocation(cWidth,0);
- controlP5 = new ControlP5(this);
- controlP5.setAutoDraw(false);
- controlWindow = controlP5.addControlWindow("controlP5window",0,0,cWidth,screen.height);
- controlWindow.hideCoordinates();
- controlWindow.setBackground(color(0));
- Controller button = controlP5.addButton("Exit",0,320,10,23,19);
- button.setWindow(controlWindow);
- }
- void draw() {
- background(255);
- controlWindow.setUndecorated(true);
- controlP5.draw();
- }
Thanks,
TheGamersHaven
2