aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/pet_control/pet_text.h
diff options
context:
space:
mode:
authorPaul Gilbert2016-04-28 19:10:18 -0400
committerPaul Gilbert2016-07-10 16:22:33 -0400
commitb7ad513b0f0c99bc670546dbb3483e93d59652ee (patch)
tree82b392afae383fba2fffe5b2016fcceb21240432 /engines/titanic/pet_control/pet_text.h
parentb324d2ea6cd422bafd846642ed54620abe7e32ea (diff)
downloadscummvm-rg350-b7ad513b0f0c99bc670546dbb3483e93d59652ee.tar.gz
scummvm-rg350-b7ad513b0f0c99bc670546dbb3483e93d59652ee.tar.bz2
scummvm-rg350-b7ad513b0f0c99bc670546dbb3483e93d59652ee.zip
TITANIC: Implement PET Text scrolling
Diffstat (limited to 'engines/titanic/pet_control/pet_text.h')
-rw-r--r--engines/titanic/pet_control/pet_text.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/engines/titanic/pet_control/pet_text.h b/engines/titanic/pet_control/pet_text.h
index 6ce1903166..36d098f141 100644
--- a/engines/titanic/pet_control/pet_text.h
+++ b/engines/titanic/pet_control/pet_text.h
@@ -57,7 +57,7 @@ private:
int _field68;
int _field6C;
bool _hasBorder;
- int _field74;
+ int _scrollTop;
CTextCursor *_textCursor;
int _field7C;
private:
@@ -81,6 +81,16 @@ private:
* Get the required height to draw the text
*/
int getTextHeight(CScreenManager *screenManager);
+
+ /**
+ * Ensures the Y scrolling for the text is in the valid range
+ */
+ void constrainScrollUp(CScreenManager *screenManager);
+
+ /**
+ * Ensures the Y scrolling for the text is in the valid range
+ */
+ void constrainScrollDown(CScreenManager *screenManager);
public:
CPetText(uint count = 10);
@@ -157,6 +167,16 @@ public:
* Get the font
*/
int getFontNumber() const { return _fontNumber1; }
+
+ /**
+ * Scroll the text up
+ */
+ void scrollUp(CScreenManager *screenManager);
+
+ /**
+ * Scroll the text down
+ */
+ void scrollDown(CScreenManager *screenManager);
};
} // End of namespace Titanic