Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. if (clicked != null) {
  2. final int mx = (int)mouse.getLocation().getX();
  3. final int my = (int)mouse.getLocation().getY();
  4. final long mpt = System.currentTimeMillis() - mouse.getPressTime();
  5.  
  6. if (mouse.getPressTime() == -1 || mpt >= 300)
  7. g.drawImage(normal, mx - 23, my - 13, null);
  8. if (mpt < 300)
  9. g.drawImage(clicked, mx - 23, my - 13, null);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement