void doUI() { background(40); noStroke(); fill(60); rect(10,50,480,400); fill(120,140,155); textFont(uifont,20); textMode(CORNER); text("SPRING MASS",10,450); textFont(uifont,12); if(key=='-') fill(220,190,190); else fill(150); text("'-' subtract node",55,470); if(key=='+') fill(220,190,190); else fill(150); text("'+' add node",55,488); if(key=='[') fill(220,190,190); else fill(150); text("'[' decrease tension",150,470); if(key==']') fill(220,190,190); else fill(150); text("']' increase tension",150,488); if(key=='g') fill(220,190,190); else fill(150); text("'g' toggle gravity",255,470); key=' '; }