From 26a2a125ed178046dc8f0d09fe1831041c5a7b32 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 5 Jun 2014 19:28:17 -0400 Subject: MADS: Added setup code for difficulty dialog --- engines/mads/nebular/dialogs_nebular.h | 35 ++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) (limited to 'engines/mads/nebular/dialogs_nebular.h') diff --git a/engines/mads/nebular/dialogs_nebular.h b/engines/mads/nebular/dialogs_nebular.h index f1cf0f2aff..4eec735fb8 100644 --- a/engines/mads/nebular/dialogs_nebular.h +++ b/engines/mads/nebular/dialogs_nebular.h @@ -103,6 +103,7 @@ enum DialogTextAlign { ALIGN_CENTER = -1, ALIGN_AT_CENTER = -2, ALIGN_RIGHT = -3 class ScreenDialog { struct DialogLine { + bool _active; int _state; Common::Point _pos; int _textDisplayIndex; @@ -130,15 +131,20 @@ protected: */ void clearLines(); + /** + * Setup lines to be clickable + */ + void setClickableLines(); + /** * Add a quote to the lines list */ - void addQuote(int id1, int id2, DialogTextAlign align, const Common::Point &pt, Font *font); + void addQuote(int id1, int id2, DialogTextAlign align, const Common::Point &pt, Font *font = nullptr); /** * Adds a line to the lines list */ - void addLine(const Common::String &msg, DialogTextAlign align, const Common::Point &pt, Font *font); + void addLine(const Common::String &msg, DialogTextAlign align, const Common::Point &pt, Font *font = nullptr); /** * Initializes variables @@ -154,11 +160,36 @@ protected: * Choose the background to display for the dialog */ void chooseBackground(); + + /** + * Handle events whilst the dialog is active + */ + bool handleEvents(); public: /** * Constructor */ ScreenDialog(MADSEngine *vm); + + /** + * Show the dialog + */ + virtual void show(); +}; + +class DifficultyDialog : public ScreenDialog { +private: + /** + * Set the lines for the dialog + */ + void setLines(); +public: + DifficultyDialog(MADSEngine *vm); + + /** + * Show the dialog + */ + virtual void show(); }; class GameMenuDialog : public ScreenDialog { -- cgit v1.2.3