@Override
    public void mouseDown(EventMouse eventMouse) {
        if (eventMouse.getPosition().getY() > getPosition().getY() + getScale().getY() - topBarHeight){
            drag = true;
            pressPosition = eventMouse.getPosition().sub(getPosition().getXY());
        }

        if (active){
            eventMouse.setGUIMouseTaken(true);
        }

        if (!eventMouse.isGUIMouseTaken()){
            Engine.getScreen().setLast(this);

            for (GUI gui: Engine.getScreen().getGUILayer()){
                if (gui instanceof GUIDialog)
                    ((GUIDialog) gui).setActive(false);
            }

            active = true;
            lastDialog = this;
        }

    }