aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/dialogs.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mads/dialogs.h')
-rw-r--r--engines/mads/dialogs.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/engines/mads/dialogs.h b/engines/mads/dialogs.h
index 61ba48034b..14e0932e05 100644
--- a/engines/mads/dialogs.h
+++ b/engines/mads/dialogs.h
@@ -110,6 +110,11 @@ private:
* Clean up after finishing displaying the dialog
*/
void restorePalette();
+
+ /**
+ * Used by the constructors to initialize the dialog fields
+ */
+ void init(int maxTextChars);
protected:
Font *_font;
int _innerWidth;
@@ -121,6 +126,9 @@ protected:
int _askLineNum;
Common::String _lines[TEXT_DIALOG_MAX_LINES];
int _lineXp[TEXT_DIALOG_MAX_LINES];
+ SpriteAsset *_edgeSeries;
+ MSurface *_icon;
+ int _piecesPerCenter;
/**
* Calculate the bounds for the dialog
@@ -138,6 +146,17 @@ public:
int maxChars);
/**
+ * Constructor
+ * @param vm Engine reference
+ * @param fontName Font to use for display
+ * @param pos Position for window top-left
+ * @param icon Speaker portrait to show in dialog
+ * @param maxTextChars Horizontal width of text portion of window in characters
+ */
+ TextDialog(MADSEngine *vm, const Common::String &fontName, const Common::Point &pos,
+ MSurface *icon, int maxTextChars);
+
+ /**
* Destructor
*/
virtual ~TextDialog();
@@ -190,9 +209,9 @@ public:
void setLineXp(int xp);
/**
- * Adds an icon to the dialog
+ * Estimates the maximum dialog length for text dialogs with icons
*/
- void addIcon(MSprite *frame);
+ int estimatePieces(int maxLen);
/**
* Show the dialog, and wait until a key or mouse press.