We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hey, so I'm making a simple version of photoshop, and I have a menu screen that pops up first.
I recently realized I will have to run draw() while my event sequence is running, else the screen will stay blank.
I tried using Runnable to just execute 2 events alongside draw(), but I couldn't get anything working. Is there an easy way to force the screen to draw but not loop?
Answers
To clarify, draw() draws the frame after every completion, so if I try to make it wait for a click, draw a new window, new buttons, etc. it'll only draw anything after the thread ends
Ok so say I have a menu screen which waits for a click before proceeding.
This:
void setup(){ size(500,700); fill(0); drawMenu(width/2,height/2,"Welcome"); drawButtons(buttons); Click clk = waitForClick(); } void draw(){ }
doesn't work because draw doesn't actually execute.
It also doesn't work if you put all that into draw(). How do I circumvent this?
You need to have your sketch use different states: