We are about to switch to a new forum software. Until then we have removed the registration on this forum.
hello,
1) how can i change the orientation from a ToggleSwitch?
now it is horizontal. But i want it vertical.
2) how can i check if the toggle has SWITCH-Mode or DEFAULT-Mode? (see line 20)
import controlP5.*;
ControlP5 cp5;
void setup() {
size(400, 400);
smooth();
cp5 = new ControlP5(this);
// create a toggle
cp5.addToggle("toggleValue")
.setPosition(40, 100)
.setSize(20, 50)
.setMode(ControlP5.SWITCH);
}
void draw() {
background(0);
println(cp5.getController("toggleValue").getMode()); //doesn't work
}
Answers
nobody an idea?
i have this:
and i want this:
(retouched with Potoshop :P)
is there any method or path to do this?
nope?
Hi, you can override the ControllerView for your Toggle (also see the ControlP5customView example that comes with controlP5), I have attached an example below and added comments accordingly: