We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Minha duvida é sobre o mousePressed(), gostaria de saber se posso usá-lo mais de uma vez, por exemplo, em duas telas com menus. Se alguém puder me ajudar, agradeço.
Answers
Tem cada tela usar o mesmo mousePressed (), mas fazer coisas diferentes dependendo de qual tela está atualmente visível. Aqui está um exemplo :
Have each screen use the same mousePressed(), but do different things depending on which screen is currently visable. Here is an example:
(Initial question was about using mousePressed() on two different screens.)
For most cases, multiple mousePressed() are unnecessary.
For example, we can know which 1 of those screen halves a click has ocurred w/ mouseX/mouseY.
class
.Even so you insist in multiple mousePressed(), you're gonna have to use registerMethod() inside a
class
.GoToLoop, tem como me mandar algum link que fale sobre registerMethod() ?
There are some forum threads tagged as registerMethod():
http://forum.Processing.org/two/discussions/tagged?Tag=registermethod()