aboutsummaryrefslogtreecommitdiff
path: root/engines/m4/mads_menus.h
diff options
context:
space:
mode:
authorPaul Gilbert2010-03-21 10:51:11 +0000
committerPaul Gilbert2010-03-21 10:51:11 +0000
commit05922881cb2e7f8b0766587b20ed496bd83653bc (patch)
treec75a784ce503330e116d1294f0ecbeea4328ae30 /engines/m4/mads_menus.h
parente6619b579299ecefcf9cf6daf0e272cb86136aa4 (diff)
downloadscummvm-rg350-05922881cb2e7f8b0766587b20ed496bd83653bc.tar.gz
scummvm-rg350-05922881cb2e7f8b0766587b20ed496bd83653bc.tar.bz2
scummvm-rg350-05922881cb2e7f8b0766587b20ed496bd83653bc.zip
Added framework for displaying game dialogs
svn-id: r48353
Diffstat (limited to 'engines/m4/mads_menus.h')
-rw-r--r--engines/m4/mads_menus.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/engines/m4/mads_menus.h b/engines/m4/mads_menus.h
index aced1d907b..0fad0cfb76 100644
--- a/engines/m4/mads_menus.h
+++ b/engines/m4/mads_menus.h
@@ -26,7 +26,9 @@
#ifndef M4_MADS_MENUS_H
#define M4_MADS_MENUS_H
+#include "common/str-array.h"
#include "m4/viewmgr.h"
+#include "m4/font.h"
namespace M4 {
@@ -86,6 +88,55 @@ public:
void updateState();
};
+class DialogTextEntry {
+public:
+ bool in_use;
+ int16 field_2;
+ Common::Point pos;
+ char text[80];
+ Font *font;
+ int widthAdjust;
+
+ int textDisplay_index;
+
+ DialogTextEntry() { in_use = false; };
+};
+
+#define DIALOG_LINES_SIZE 20
+
+class RexDialogView: public View {
+private:
+ int _priorSceneId;
+ bool _initialised;
+
+ void initialiseGraphics();
+ void loadBackground();
+ void loadMenuSprites();
+protected:
+ M4Surface *_backgroundSurface;
+ RGBList *_bgPalData;
+ SpriteAsset *_menuSprites;
+ RGBList *_spritesPalData;
+
+ Common::Array<DialogTextEntry> _dialogText;
+ int _totalTextEntries;
+ int _dialogSelectedLine;
+ Common::StringArray _saveList;
+public:
+ RexDialogView();
+ ~RexDialogView();
+
+ virtual void updateState();
+ virtual void onRefresh(RectList *rects, M4Surface *destSurface);
+};
+
+class RexGameMenuDialog: public RexDialogView {
+public:
+ RexGameMenuDialog(): RexDialogView() {};
+
+ virtual void onRefresh(RectList *rects, M4Surface *destSurface);
+};
+
}
#endif