public void controlEvent(ControlEvent theEvent) { if (theEvent.isController()) { if (theEvent.controller().name() == "Clear Screen") { background(255); } if (theEvent.controller().name() == "Leaf Red") { leafRed = theEvent.controller().value(); } if (theEvent.controller().name() == "Leaf Blue") { leafBlue = theEvent.controller().value(); } if (theEvent.controller().name() == "Leaf Green") { leafGreen = theEvent.controller().value(); } if (theEvent.controller().name() == "Branch Random") { branchRandom = theEvent.controller().value(); } if (theEvent.controller().name() == "Leaf Random") { leafRandom = theEvent.controller().value(); } if (theEvent.controller().name() == "Leaf Size") { leafSize = theEvent.controller().value(); } if (theEvent.controller().name() == "Start Size") { startSize = theEvent.controller().value(); } } }