Initial commit

This commit is contained in:
61616
2022-03-31 14:53:00 -04:00
commit f6ef69b52f
9 changed files with 464 additions and 0 deletions

49
mGui.pde Normal file
View File

@@ -0,0 +1,49 @@
/*
Actual GUI file that defines all gui elements
*/
class Gui {
CButton cb;
Gui(){
cb = new CButton();
}
void display(){
cb.display();
}
boolean clickManager(Vector mouse){
return cb.clicked(mouse.x,mouse.y);
}
}
class CButton extends Button{
CButton(){
pos = new Vector(width/2,15);
dim = new Vector(70,24);
t = "center";
tSize = 20;
}
void display(){
fill(col);
rectMode(CENTER);
rect(pos.x,pos.y,dim.x,dim.y,rad);
fill(tCol);
textAlign(CENTER,CENTER);
textSize(tSize);
text(t,pos.x,pos.y - tSize/4);
}
boolean clicked(float mx, float my){
if(mouseOver(mx,my)){
flags.centerOnFocus = true;
return true;
}else{return false;}
}
}