From 11cde7b4138906c050efef73ce011777d6298cfb Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 17 Apr 2016 21:54:29 -0400 Subject: TITANIC: Implement CPetGlyphs setup --- engines/titanic/pet_control/pet_glyphs.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'engines/titanic/pet_control/pet_glyphs.cpp') diff --git a/engines/titanic/pet_control/pet_glyphs.cpp b/engines/titanic/pet_control/pet_glyphs.cpp index a9a15c5ac2..196424121f 100644 --- a/engines/titanic/pet_control/pet_glyphs.cpp +++ b/engines/titanic/pet_control/pet_glyphs.cpp @@ -50,7 +50,7 @@ bool CPetGlyph::translateContains(const Point &delta, const Point &pt) { /*------------------------------------------------------------------------*/ CPetGlyphs::CPetGlyphs() : _firstVisibleIndex(0), _numVisibleGlyphs(7), - _highlightIndex(-1), _field1C(-1), _field20(0), _field24(0) { + _highlightIndex(-1), _field1C(-1), _field20(0), _owner(nullptr) { } void CPetGlyphs::setNumVisible(int total) { @@ -65,7 +65,16 @@ void CPetGlyphs::clear() { } void CPetGlyphs::setup(int numVisible, CPetSection *owner) { - error("TODO"); + setNumVisible(numVisible); + _owner = owner; + _selection.setBounds(Rect(0, 0, 76, 76)); + + int buttonsLeft = numVisible * 7 * 5 + 21; + + _scrollLeft.setBounds(Rect(0, 0, 31, 15)); + _scrollLeft.translate(buttonsLeft, 373); + _scrollRight.setBounds(Rect(0, 0, 31, 15)); + _scrollRight.translate(buttonsLeft, 413); } void CPetGlyphs::reset() { -- cgit v1.2.3