controlp5 tabs
in
Contributed Library Questions
•
1 year ago
hello,
Controlp5 have a lot great tutorials of how to put sliders, toggles etc. to separate tabs, but I cant find any explanation of how to put basic shapes to different tabs.
in example below I want put rectangle to "rectangle" tab and ellipse to "ellipse" tab.
that is the best way to do that ?
thanks for help.
- import controlP5.*;
- ControlP5 p5;
- void setup() {
- size(400, 300);
- p5 = new ControlP5(this);
- p5. addTab("rectangle");
- p5. addTab("ellipse");
- }
- void draw() {
- background(120);
- rect(30, 20, 55, 55);
- ellipse(150, 150, 100, 100);
- }
1