So I’m using a library called controlP5 for a project I’m doing. I’m making a menu where I use conrtolP5’s buttons and toggles. The buttons work fine but I’m having a problem with the toggles. The buttons have the name of the button labelled ontop of the button itself while the toggle places the label below the toggle. I was wondering how I could move the label to the middle of the toggle similarly to how the button is? Here is the code I’m using for the toggle:
boolean items = true;
Width = 1280;
Height = 720;
cp5.addToggle("Items")
.setBroadcast(false)
.setValue(items)
.setBroadcast(true)
.setPosition(Width/10,Height <em>6/10)
.setSize(Width</em> 8/10,Height/10)
.setColorBackground(color(255,0,0))
.setColorActive(color(110,160,255))
.getCaptionLabel()
.setFont(font)
.toUpperCase(false)
;