Hi everyone,
I try to set my font on my button, i tried a few thinks like
public ControlFont(processing.core.PFont theFont)
but it doesen’t really work but its my first projekt with processing an controlP5,
I also tried things I know from css and html…
here is my code :
import controlP5.*;
ControlP5 cp5;
int myColor = color(#B7AEAE);
int c1,c2;
float n,n1;
void setup() {
PFont font;
font = loadFont("CorbelLight-48.vlw");
size(510, 800);
cp5 = new ControlP5(this);
// create a new button with name '9'
cp5.addButton("9")
.setValue(9)
.setPosition(370,60)
.setSize(100,100);
}
void draw() {
background(#363936);
stroke(#6A6664);
fill(#466E9D);
// x y width
square(370, 60, 100);
square(260, 60, 100);
square(150, 60, 100);
square(40, 60, 100);
square(370, 170, 100);
square(260, 170, 100);
square(150, 170, 100);
square(40, 170, 100);
square(370, 280, 100);
square(260, 280, 100);
square(150, 280, 100);
square(40, 280, 100);
square(370, 390, 100);
square(260, 390, 100);
square(150, 390, 100);
square(40, 390, 100);
}