I’m currently working on a coding project and needed a bit of help on how to do something. I want to be able to have a different “text box” appear every time the user clicks the corner of the canvas. The text box and everything will essentially be the same and will be in the same spot every time the user clicks the corner of the canvas, though the text inside will simply be different every time. (It’s okay if the text repeats sometimes.)
Can someone please help me out with this? Any feedback is greatly appreciated! Thank you
Hello @chemicalite,
Please post your code attempt so far so we can better answer your question. Otherwise, we can only guess what you do and don’t understand…
That’s awesome! I’m super new to processing, and had no idea where to start- those resources and your suggestions are extremely helpful though! Thank you so much!
Sorry, I failed to see this was a processing question, those links are for p5.js. Same principles though, here is a good place to start for processing …
Thank you so much, everyone! I was able to figure it out and I’m quite pleased with the result! I had an additional question- how can I prevent the popup text box from going back so quickly, or how can I delay the code in some way to make the text box stay on the screen for two to three seconds?
How would you clearly explain what the “something” test should be for whether draw should show the text or not? Try thinking it through in English, but as if you were explaining it to a robot who is wondering – how do I know whether I should show text?