Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setup ()
- {
- size(400,400);
- }
- void draw()
- {
- background(255);
- fill(150);
- rect(100,100,20,20);
- if (mousePressed)
- {
- String text= "The mouse is pressed and over the button";
- fill(0);
- text(text, mouseX+5, mouseY-5);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement