@Override
    public void mouseReleased(int button, int x, int y) {
        super.mouseReleased(button, x, y);
        pressed = false;
        if (dragged) {
            dragged = false;
            dragListener.onDragStop(this, x, y);
        }
    }