diff options
Diffstat (limited to 'engines/mads/dialogs.h')
-rw-r--r-- | engines/mads/dialogs.h | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/engines/mads/dialogs.h b/engines/mads/dialogs.h index 27bc0a43ee..7642b76a3c 100644 --- a/engines/mads/dialogs.h +++ b/engines/mads/dialogs.h @@ -31,6 +31,7 @@ namespace MADS { #define DIALOG_TOP 22 +#define POPUP_CENTER 0x8000 class Dialog { private: @@ -109,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; @@ -120,6 +126,10 @@ protected: int _askLineNum; Common::String _lines[TEXT_DIALOG_MAX_LINES]; int _lineXp[TEXT_DIALOG_MAX_LINES]; + SpriteAsset *_edgeSeries; + MSurface *_icon; + int _piecesPerCenter; + int _fontSpacing; /** * Calculate the bounds for the dialog @@ -137,6 +147,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(); @@ -189,8 +210,13 @@ public: void setLineXp(int xp); /** - * Show the dialog, and wait until a key or mouse press. - */ + * Estimates the maximum dialog length for text dialogs with icons + */ + int estimatePieces(int maxLen); + + /** + * Show the dialog, and wait until a key or mouse press. + */ virtual void show(); }; |