@Override public void eventMouse(MouseEvent e) { if (!this.isVisible()) { this.state = NORMAL; return; } int button = e.getButton(); boolean state = e.getState(); Vec2i mouse = new Vec2i(e.getX(), e.getY()); if (this.getBoundsDisp().contains(mouse)) { if (!state) { if (this.state == PRESSED && button == BUTTON_LEFT) { this.clicked = true; this.state = MOUSE_ON; } if (this.state == NORMAL) { this.state = MOUSE_ON; } } else if (button == BUTTON_LEFT) { this.state = PRESSED; } } else { this.state = NORMAL; } }