void doUI(creature c) { lattice rawr=c.phenotype; genome meow=c.genotype; background(40); stroke(60); fill(0); rect(10,50,480,400); //Mirror Line stroke(20); line(width/2,50,width/2,449); if(displayGenomeUI) { drawGenome(meow,genomeAnchor); genomeAnchor=new position(25-genomeScroll.ratio()*(wWidth)*float(c.amount)*.5,50); genomeScroll.update(); } textFont(uiFont,12); fill(120); if(useRK) { text("RK: ",width-30,14); fill(230,0,0); rect(width-13,5,6,8); } else { text("RK: ",width-30,14); fill(120,0,0); rect(width-13,5,6,8); } noStroke(); fill(120,140,155); textFont(uiFont,20); textMode(CORNER); text("EVOLUTION",10,450); if(rawr.nodes.length>=c.maxNodes) fill(160,120,120); else fill(120); textFont(uiFont,12); text("point mass: "+rawr.nodes.length,10,20); fill(120); text("spring tension: "+float(int(rawr.tension*1000))/1000,90,20); text("collision tension: "+float(int(rawr.collisionTension*1000))/1000,90,30); text("friction constant: "+FRICTION_FORCE,200,20); text("display mode: "+displayMode,200,30); text("total energy: "+nf(rawr.totalEnergy,5,2),320,20); text("status: ",320,30); if(rawr.totalEnergy/rawr.nodes.length<60) text("stable",375,30); else { fill(220,0,0); text("unstable",375,30); } fill(120); if(selected!=null) { text("selected node ID: "+selectedID,mouseX+10,mouseY); text("selected node gene ID: "+selected.g.id,mouseX+10,mouseY+10); text("selected neuron ID: "+selected.n.id,mouseX+10,mouseY+20); } fill(150); textFont(uiFont,15); text("key",20,476); textFont(uiFont,12); if(key=='h') fill(120,220,190); else fill(150); text("'h' toggle UI",55,470); if(key=='1'||key=='2'||key=='3') fill(120,220,190); else fill(150); text("'1-3' display modes",55,488); /* if(key=='+') fill(220,190,190); else fill(150); text("'+' add node",55,488); */ if(key=='n') fill(220,190,190); else fill(150); text("'n' mutate genome",150,470); // if(key=='e') // fill(220,190,190); // else // fill(150); // text("'e' export creature",150,488); // if(key=='g' || useGravity) // fill(120,220,190); // else // fill(150); // text("'g' toggle gravity",255,470); if(key=='c') fill(220,190,190); else fill(150); text("'c' create new",150,488); if(key=='s'||useSmooth) fill(220,190,190); else fill(150); text("'s' anti-alias",345,470); if(key=='m'||useMirror) fill(220,190,190); else fill(150); text("'m' mirror phenotype",345,488); /* for(int i=0;i