Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. @Override
  2. public void mousePressed(MouseEvent e) {
  3. Point mp = e.getPoint();
  4. int absoluteY = Widgets.getComponent(Game.WIDGET_CHAT_BOX, 0).getAbsoluteY() - 1;
  5. final Rectangle toggleRectangle = new Rectangle(493, absoluteY + 3, 16, 15);
  6. final Rectangle moreInfoRect = new Rectangle(420, absoluteY + 3, 70, 15);
  7. if (toggleRectangle.contains(mp)) {
  8. if (pressed) {
  9. pressed = false;
  10. } else {
  11. pressed = true;
  12. }
  13. } else if (moreInfoRect.contains(mp)) {
  14. if (moreInfo) {
  15. moreInfo = false;
  16. } else {
  17. moreInfo = true;
  18. }
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement