public GUI getLastDialog() {

        GUI lastDialog = null;

        for (GUI gui: guiLayer){
            if (gui instanceof GUIDialog)
                lastDialog = gui;
        }

        return lastDialog;
    }