aboutsummaryrefslogtreecommitdiff
path: root/engines/m4/mads_menus.h
diff options
context:
space:
mode:
authorPaul Gilbert2010-03-24 11:49:26 +0000
committerPaul Gilbert2010-03-24 11:49:26 +0000
commitcf5cd833fde2765668aea3b8f234388da3f9f94d (patch)
tree725cdaa1ff530f6f412b4c98cfba6dee5a9e8615 /engines/m4/mads_menus.h
parentd34fd9cdd667dea9ce11bf4aa9028b3e91caf19a (diff)
downloadscummvm-rg350-cf5cd833fde2765668aea3b8f234388da3f9f94d.tar.gz
scummvm-rg350-cf5cd833fde2765668aea3b8f234388da3f9f94d.tar.bz2
scummvm-rg350-cf5cd833fde2765668aea3b8f234388da3f9f94d.zip
Moved new MadsView related code into Mads_Views, where it's more appropriate. Added extra logic necessary for displaying text in the game dialogs
svn-id: r48378
Diffstat (limited to 'engines/m4/mads_menus.h')
-rw-r--r--engines/m4/mads_menus.h32
1 files changed, 20 insertions, 12 deletions
diff --git a/engines/m4/mads_menus.h b/engines/m4/mads_menus.h
index 5d3258ab46..d732723fcf 100644
--- a/engines/m4/mads_menus.h
+++ b/engines/m4/mads_menus.h
@@ -28,6 +28,7 @@
#include "common/str-array.h"
#include "m4/viewmgr.h"
+#include "m4/mads_views.h"
#include "m4/font.h"
namespace M4 {
@@ -36,6 +37,8 @@ namespace M4 {
enum MadsGameAction {START_GAME, RESUME_GAME, SHOW_INTRO, CREDITS, QUOTES, EXIT};
+enum MadsLayers {LAYER_GUI = 19};
+
class RexMainMenuView : public View {
private:
M4Surface *_bgSurface;
@@ -88,10 +91,12 @@ public:
void updateState();
};
+enum DialogTextState {STATE_DESELECTED = 0, STATE_HIGHLIGHTED = 1, STATE_SELECTED = 2};
+
class DialogTextEntry {
public:
bool in_use;
- int16 field_2;
+ int state;
Common::Point pos;
char text[80];
Font *font;
@@ -116,26 +121,28 @@ private:
void loadBackground();
void loadMenuSprites();
protected:
- int _word_8502C;
- int _selectedLine;
- int _lineIndex;
- bool _enterFlag;
- Common::StringArray _textLines;
-
- void setFrame(int frameNumber, int depth);
- void initVars();
- void addLine(const char *msg_p, Font *font, MadsTextAlignment alignment, int left, int top);
- void addQuote(Font *font, MadsTextAlignment alignment, int left, int top, int id1, int id2 = 0);
-protected:
M4Surface *_backgroundSurface;
RGBList *_bgPalData;
SpriteAsset *_menuSprites;
RGBList *_spritesPalData;
Common::Array<DialogTextEntry> _dialogText;
+ Common::StringArray _textLines;
int _totalTextEntries;
int _dialogSelectedLine;
Common::StringArray _saveList;
+
+ int _word_8502C;
+ int _selectedLine;
+ int _lineIndex;
+ bool _enterFlag;
+
+ void setFrame(int frameNumber, int depth);
+ void initVars();
+ void addLine(const char *msg_p, Font *font, MadsTextAlignment alignment, int left, int top);
+ void addQuote(Font *font, MadsTextAlignment alignment, int left, int top, int id1, int id2 = 0);
+ void setClickableLines();
+ void refreshText();
public:
RexDialogView();
~RexDialogView();
@@ -151,6 +158,7 @@ public:
RexGameMenuDialog();
virtual void onRefresh(RectList *rects, M4Surface *destSurface);
+ virtual bool onEvent(M4EventType eventType, int32 param1, int x, int y, bool &captureEvents);
};
}