diff options
author | Paul Gilbert | 2016-04-28 18:33:01 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-10 16:22:32 -0400 |
commit | b324d2ea6cd422bafd846642ed54620abe7e32ea (patch) | |
tree | cf203de4c96458efaa4406e21ef2cfa429a30aeb /engines/titanic/pet_control | |
parent | e778ac8bcd6c2e0a026c813614c884e5044110c3 (diff) | |
download | scummvm-rg350-b324d2ea6cd422bafd846642ed54620abe7e32ea.tar.gz scummvm-rg350-b324d2ea6cd422bafd846642ed54620abe7e32ea.tar.bz2 scummvm-rg350-b324d2ea6cd422bafd846642ed54620abe7e32ea.zip |
TITANIC: FIx confusion between mouse down & up messages in CPetGlyph hierarchy
Diffstat (limited to 'engines/titanic/pet_control')
-rw-r--r-- | engines/titanic/pet_control/pet_glyphs.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_glyphs.h | 9 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_load_save.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_load_save.h | 5 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_quit.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_quit.h | 5 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_rooms_glyphs.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_rooms_glyphs.h | 4 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_sound.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_sound.h | 5 |
10 files changed, 17 insertions, 21 deletions
diff --git a/engines/titanic/pet_control/pet_glyphs.cpp b/engines/titanic/pet_control/pet_glyphs.cpp index 8f8d8ba331..ed879f286b 100644 --- a/engines/titanic/pet_control/pet_glyphs.cpp +++ b/engines/titanic/pet_control/pet_glyphs.cpp @@ -323,7 +323,7 @@ bool CPetGlyphs::MouseButtonDownMsg(const Point &pt) { CPetGlyph *glyph = getGlyph(_highlightIndex); if (glyph) { - if (glyph->checkHighlight(pt)) + if (glyph->MouseButtonDownMsg(pt)) return true; if (!(_flags & GFLAG_2)) { diff --git a/engines/titanic/pet_control/pet_glyphs.h b/engines/titanic/pet_control/pet_glyphs.h index cefcd5cae9..792050166c 100644 --- a/engines/titanic/pet_control/pet_glyphs.h +++ b/engines/titanic/pet_control/pet_glyphs.h @@ -126,10 +126,9 @@ public: virtual Rect getBounds() { return Rect(); } /** - * Checks and updates any highlight of the glyph or any contextual - * information it displays + * Called for mouse button down messages */ - virtual bool checkHighlight(const Point &pt) { return false; } + virtual bool MouseButtonDownMsg(const Point &pt) { return false; } /** * Called when mouse drag starts @@ -174,9 +173,9 @@ public: virtual void proc27(const Point &pt, bool flag) {} /** - * Handles mouse button down messages + * */ - virtual void MouseButtonDownMsg(const Point &pt) {} + virtual void proc28(const Point &pt) {} virtual int proc29(const Point &pt) { return 0; } diff --git a/engines/titanic/pet_control/pet_load_save.cpp b/engines/titanic/pet_control/pet_load_save.cpp index b8cb3dae46..0ae9f3fe77 100644 --- a/engines/titanic/pet_control/pet_load_save.cpp +++ b/engines/titanic/pet_control/pet_load_save.cpp @@ -71,7 +71,7 @@ void CPetLoadSave::draw2(CScreenManager *screenManager) { _btnLoadSave.draw(screenManager); } -bool CPetLoadSave::checkHighlight(const Point &pt) { +bool CPetLoadSave::MouseButtonDownMsg(const Point &pt) { if (_btnLoadSave.MouseButtonDownMsg(pt)) return true; diff --git a/engines/titanic/pet_control/pet_load_save.h b/engines/titanic/pet_control/pet_load_save.h index ef7e54a3f2..8f8634dfdf 100644 --- a/engines/titanic/pet_control/pet_load_save.h +++ b/engines/titanic/pet_control/pet_load_save.h @@ -83,10 +83,9 @@ public: virtual void draw2(CScreenManager *screenManager); /** - * Checks and updates any highlight of the glyph or any contextual - * information it displays + * Called for mouse button down messages */ - virtual bool checkHighlight(const Point &pt); + virtual bool MouseButtonDownMsg(const Point &pt); /** * Handles mouse button messages diff --git a/engines/titanic/pet_control/pet_quit.cpp b/engines/titanic/pet_control/pet_quit.cpp index dff3ea3ca8..6959160afa 100644 --- a/engines/titanic/pet_control/pet_quit.cpp +++ b/engines/titanic/pet_control/pet_quit.cpp @@ -67,7 +67,7 @@ void CPetQuit::draw2(CScreenManager *screenManager) { _btnYes.draw(screenManager); } -bool CPetQuit::checkHighlight(const Point &pt) { +bool CPetQuit::MouseButtonDownMsg(const Point &pt) { return !_btnYes.MouseButtonDownMsg(pt); } diff --git a/engines/titanic/pet_control/pet_quit.h b/engines/titanic/pet_control/pet_quit.h index 72b93c152f..7d22690ff8 100644 --- a/engines/titanic/pet_control/pet_quit.h +++ b/engines/titanic/pet_control/pet_quit.h @@ -50,10 +50,9 @@ public: virtual void draw2(CScreenManager *screenManager); /** - * Checks and updates any highlight of the glyph or any contextual - * information it displays + * Called for mouse button down messages */ - virtual bool checkHighlight(const Point &pt); + virtual bool MouseButtonDownMsg(const Point &pt); /** * Handles mouse button up messages diff --git a/engines/titanic/pet_control/pet_rooms_glyphs.cpp b/engines/titanic/pet_control/pet_rooms_glyphs.cpp index d127c412f9..c45e0389ce 100644 --- a/engines/titanic/pet_control/pet_rooms_glyphs.cpp +++ b/engines/titanic/pet_control/pet_rooms_glyphs.cpp @@ -64,7 +64,7 @@ void CPetRoomsGlyph::drawAt(CScreenManager *screenManager, const Point &pt) { warning("TODO: CPetRoomsGlyph::drawAt"); } -void CPetRoomsGlyph::MouseButtonDownMsg(const Point &pt) { +void CPetRoomsGlyph::proc28(const Point &pt) { } diff --git a/engines/titanic/pet_control/pet_rooms_glyphs.h b/engines/titanic/pet_control/pet_rooms_glyphs.h index 2832438fc9..d08be131c8 100644 --- a/engines/titanic/pet_control/pet_rooms_glyphs.h +++ b/engines/titanic/pet_control/pet_rooms_glyphs.h @@ -63,9 +63,9 @@ public: virtual void draw2(CScreenManager *screenManager) {} /** - * Handles mouse button down messages + * */ - virtual void MouseButtonDownMsg(const Point &pt); + virtual void proc28(const Point &pt); virtual int proc29(const Point &pt); virtual void proc32(); diff --git a/engines/titanic/pet_control/pet_sound.cpp b/engines/titanic/pet_control/pet_sound.cpp index 9fb3a07322..4d2bf37831 100644 --- a/engines/titanic/pet_control/pet_sound.cpp +++ b/engines/titanic/pet_control/pet_sound.cpp @@ -123,7 +123,7 @@ void CPetSound::draw2(CScreenManager *screenManager) { _textSpeechVolume.draw(screenManager); } -bool CPetSound::checkHighlight(const Point &pt) { +bool CPetSound::MouseButtonDownMsg(const Point &pt) { if (_musicVolume.checkThumb(pt) || _masterVolume.checkThumb(pt) || _speechVolume.checkThumb(pt)) return true; diff --git a/engines/titanic/pet_control/pet_sound.h b/engines/titanic/pet_control/pet_sound.h index 267bd03309..c4b663ad44 100644 --- a/engines/titanic/pet_control/pet_sound.h +++ b/engines/titanic/pet_control/pet_sound.h @@ -69,10 +69,9 @@ public: virtual void draw2(CScreenManager *screenManager); /** - * Checks and updates any highlight of the glyph or any contextual - * information it displays + * Called for mouse button down messages */ - virtual bool checkHighlight(const Point &pt); + virtual bool MouseButtonDownMsg(const Point &pt); /** * Called when mouse drag starts |