aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/pet_control/pet_glyphs.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-04-17 21:54:29 -0400
committerPaul Gilbert2016-07-10 16:11:22 -0400
commit11cde7b4138906c050efef73ce011777d6298cfb (patch)
treed3fe307240d5b51dba3e39f82f45ca0852e7743e /engines/titanic/pet_control/pet_glyphs.cpp
parent46a30255b0e5a7f5dad4fd032388d31a69208b62 (diff)
downloadscummvm-rg350-11cde7b4138906c050efef73ce011777d6298cfb.tar.gz
scummvm-rg350-11cde7b4138906c050efef73ce011777d6298cfb.tar.bz2
scummvm-rg350-11cde7b4138906c050efef73ce011777d6298cfb.zip
TITANIC: Implement CPetGlyphs setup
Diffstat (limited to 'engines/titanic/pet_control/pet_glyphs.cpp')
-rw-r--r--engines/titanic/pet_control/pet_glyphs.cpp13
1 files changed, 11 insertions, 2 deletions
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() {