aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/nebular/dialogs_nebular.h
diff options
context:
space:
mode:
authorPaul Gilbert2014-07-18 20:20:18 -0400
committerPaul Gilbert2014-07-18 20:20:18 -0400
commit97d29debeb008bf75ed4bda1ec884fd17e49a8bc (patch)
tree15b55c1c1a26382bf2a756f5524adca5c3ddfbc1 /engines/mads/nebular/dialogs_nebular.h
parent79d4f09cabd7dc75ecc691f0c36f08bb514b4d4d (diff)
downloadscummvm-rg350-97d29debeb008bf75ed4bda1ec884fd17e49a8bc.tar.gz
scummvm-rg350-97d29debeb008bf75ed4bda1ec884fd17e49a8bc.tar.bz2
scummvm-rg350-97d29debeb008bf75ed4bda1ec884fd17e49a8bc.zip
MADS: Beginnings of work on Rex Nebular main menu
Diffstat (limited to 'engines/mads/nebular/dialogs_nebular.h')
-rw-r--r--engines/mads/nebular/dialogs_nebular.h64
1 files changed, 55 insertions, 9 deletions
diff --git a/engines/mads/nebular/dialogs_nebular.h b/engines/mads/nebular/dialogs_nebular.h
index 44412797a1..46973cc497 100644
--- a/engines/mads/nebular/dialogs_nebular.h
+++ b/engines/mads/nebular/dialogs_nebular.h
@@ -107,7 +107,35 @@ enum DialogTextAlign { ALIGN_NONE = 0, ALIGN_CENTER = -1, ALIGN_AT_CENTER = -2,
enum DialogState { DLGSTATE_UNSELECTED = 0, DLGSTATE_SELECTED = 1, DLGSTATE_FOCUSED = 2 };
-class ScreenDialog {
+class FullScreenDialog {
+protected:
+ /**
+ * Engine reference
+ */
+ MADSEngine *_vm;
+
+ /**
+ * Used to store the original screen background
+ */
+ MSurface _savedSurface;
+
+ /**
+ * Screen/scene to show background from
+ */
+ int _screenId;
+
+ /**
+ * Handles displaying the screen background and dialog
+ */
+ virtual void display();
+public:
+ /**
+ * Constructor
+ */
+ FullScreenDialog(MADSEngine *vm);
+};
+
+class GameDialog: public FullScreenDialog {
struct DialogLine {
bool _active;
DialogState _state;
@@ -116,22 +144,25 @@ class ScreenDialog {
Common::String _msg;
Font *_font;
int _widthAdjust;
-
+
DialogLine();
DialogLine(const Common::String &s);
};
protected:
- MADSEngine *_vm;
Common::Array<DialogLine> _lines;
int _tempLine;
bool _movedFlag;
bool _redrawFlag;
int _selectedLine;
bool _dirFlag;
- int _screenId;
int _menuSpritesIndex;
int _lineIndex;
int _textLineCount;
+
+ /**
+ * Display the dialog
+ */
+ virtual void display();
/**
* Reset the lines list for the dialog
@@ -181,12 +212,12 @@ public:
/**
* Constructor
*/
- ScreenDialog(MADSEngine *vm);
+ GameDialog(MADSEngine *vm);
/**
* Destructor
*/
- virtual ~ScreenDialog();
+ virtual ~GameDialog();
/**
* Show the dialog
@@ -194,7 +225,7 @@ public:
virtual void show();
};
-class DifficultyDialog : public ScreenDialog {
+class DifficultyDialog : public GameDialog {
private:
/**
* Set the lines for the dialog
@@ -204,12 +235,17 @@ public:
DifficultyDialog(MADSEngine *vm);
/**
+ * Display the dialog
+ */
+ virtual void display();
+
+ /**
* Show the dialog
*/
virtual void show();
};
-class GameMenuDialog : public ScreenDialog {
+class GameMenuDialog : public GameDialog {
private:
/**
* Set the lines for the dialog
@@ -219,12 +255,17 @@ public:
GameMenuDialog(MADSEngine *vm);
/**
+ * Display the dialog
+ */
+ virtual void display();
+
+ /**
* Show the dialog
*/
virtual void show();
};
-class OptionsDialog : public ScreenDialog {
+class OptionsDialog : public GameDialog {
private:
/**
* Set the lines for the dialog
@@ -239,6 +280,11 @@ public:
OptionsDialog(MADSEngine *vm);
/**
+ * Display the dialog
+ */
+ virtual void display();
+
+ /**
* Show the dialog
*/
virtual void show();