diff options
Diffstat (limited to 'engines/titanic/pet_control/pet_glyphs.cpp')
-rw-r--r-- | engines/titanic/pet_control/pet_glyphs.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/titanic/pet_control/pet_glyphs.cpp b/engines/titanic/pet_control/pet_glyphs.cpp index 2bf73d909c..b121a17288 100644 --- a/engines/titanic/pet_control/pet_glyphs.cpp +++ b/engines/titanic/pet_control/pet_glyphs.cpp @@ -52,6 +52,16 @@ CPetSection *CPetGlyph::getPetSection() const { return _owner ? _owner->getOwner() : nullptr; } +CPetControl *CPetGlyph::getPetControl() const { + return _owner ? _owner->getPetControl() : nullptr; +} + +void CPetGlyph::setName(const CString &name, CPetControl *petControl) { + Rect r(0, 0, 52, 52); + _element.setBounds(r); + _element.reset(name, petControl, MODE_UNSELECTED); +} + /*------------------------------------------------------------------------*/ CPetGlyphs::CPetGlyphs() : _firstVisibleIndex(0), _numVisibleGlyphs(TOTAL_GLYPHS), @@ -178,4 +188,8 @@ CPetGlyph *CPetGlyphs::getGlyph(int index) { return nullptr; } +CPetControl *CPetGlyphs::getPetControl() const { + return _owner ? _owner->getPetControl() : nullptr; +} + } // End of namespace Titanic |