aboutsummaryrefslogtreecommitdiff
path: root/newgui.h
diff options
context:
space:
mode:
authorMax Horn2002-07-07 21:46:53 +0000
committerMax Horn2002-07-07 21:46:53 +0000
commit2b50e2a7c0d6ed250a4b58fa0fa1bf18c458d091 (patch)
tree21d2206732b1c818858a160a23d3dee8ae8762fd /newgui.h
parentaec25305294920da84a7d0721a2fd4e7f2547c74 (diff)
downloadscummvm-rg350-2b50e2a7c0d6ed250a4b58fa0fa1bf18c458d091.tar.gz
scummvm-rg350-2b50e2a7c0d6ed250a4b58fa0fa1bf18c458d091.tar.bz2
scummvm-rg350-2b50e2a7c0d6ed250a4b58fa0fa1bf18c458d091.zip
added dialog nesting code (for now using std::stack, I will provide my own stack class later
svn-id: r4483
Diffstat (limited to 'newgui.h')
-rw-r--r--newgui.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/newgui.h b/newgui.h
index e4c17d6aaf..8b52e15fcd 100644
--- a/newgui.h
+++ b/newgui.h
@@ -21,11 +21,15 @@
#ifndef NEWGUI_H
#define NEWGUI_H
+#include <stack>
+
#include "scummsys.h"
class Scumm;
class Dialog;
+typedef std::stack<Dialog *> DialogStack;
+
class NewGui {
friend class Dialog;
public:
@@ -39,15 +43,15 @@ public:
void saveloadDialog();
void loop();
- bool isActive() { return _active; }
+ bool isActive() { return ! _dialogStack.empty(); }
NewGui(Scumm *s);
protected:
Scumm *_s;
- bool _active;
bool _need_redraw;
- Dialog *_activeDialog;
+// Dialog *_activeDialog;
+ DialogStack _dialogStack;
Dialog *_pauseDialog;
Dialog *_saveLoadDialog;
@@ -67,6 +71,9 @@ protected:
void saveState();
void restoreState();
+
+ void openDialog(Dialog *dialog);
+ void closeTopDialog();
public:
// Drawing