We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi all,
Question is as in title. I'm curious about how buttons are displayed but can't see anything in the code that hints why nothing is needed in the draw method.
Thanks, Jordan
Answers
Processing supports a number of callbacks which a library can use. One of them is executed at the end of the draw() method but before the frame is rendered. G4P uses this to draw its controls.
This sketch demonstrates how G4P does it.
Ah, ok. The key part is the register method and defining the public draw method in the class.
Thanks for the help :)
The class also has to be declared
public