diff options
author | Paul Gilbert | 2016-04-27 19:50:58 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-10 16:12:08 -0400 |
commit | 74e40be66e231a8eada9bc045828e17f044a7c55 (patch) | |
tree | 6a01477fc759ee49917b80267838243f9d02211d /engines/titanic/support/text_cursor.h | |
parent | a2f933a80e5e830cdbcbb530f334c41725ee87b2 (diff) | |
download | scummvm-rg350-74e40be66e231a8eada9bc045828e17f044a7c55.tar.gz scummvm-rg350-74e40be66e231a8eada9bc045828e17f044a7c55.tar.bz2 scummvm-rg350-74e40be66e231a8eada9bc045828e17f044a7c55.zip |
TITANIC: Implementing text cursor drawing
Diffstat (limited to 'engines/titanic/support/text_cursor.h')
-rw-r--r-- | engines/titanic/support/text_cursor.h | 49 |
1 files changed, 37 insertions, 12 deletions
diff --git a/engines/titanic/support/text_cursor.h b/engines/titanic/support/text_cursor.h index c9fcfa35dd..d8c6ac0653 100644 --- a/engines/titanic/support/text_cursor.h +++ b/engines/titanic/support/text_cursor.h @@ -34,17 +34,20 @@ class CVideoSurface; class CTextCursor { private: CScreenManager *_screenManager; + CVideoSurface *_backRenderSurface; + CVideoSurface *_frontRenderSurface; Point _pos; - Rect _bounds; - uint _priorTicks; - int _field24; + Rect _screenBounds; + uint _blinkDelay; + bool _blinkVisible; Point _size; Point _screenTopLeft; - int _field44; - int _field48; - int _field4C; + uint _priorBlinkTime; + byte _cursorR; + byte _cursorG; + byte _cursorB; CVideoSurface *_surface; - int _field54; + int _mode; public: bool _active; public: @@ -71,24 +74,46 @@ public: /** * Set bounds */ - void setBounds(const Rect &r) { _bounds = r; } + void setBounds(const Rect &r) { _screenBounds = r; } /** * Clear the bounds */ - void clearBounds() { _bounds.clear(); } + void clearBounds() { _screenBounds.clear(); } /** - * Set the prior ticks + * Set the blinking rate */ - void setTicks(uint ticks) { _priorTicks = ticks; } + void setBlinkRate(uint ticks) { _blinkDelay = ticks; } + + /** + * Set the cursor color + */ + void setColor(byte r, byte g, byte b); /** * Returns whether the text cursor is active */ bool isActive() const { return _active; } - int get54() const { return _field54; } + int getMode() const { return _mode; } + + void setMode(int mode) { _mode = mode; } + + /** + * Show the text cursor + */ + void show(); + + /** + * Hide the text cursor + */ + void hide(); + + /** + * Update and draw the cursor if necessary + */ + void draw(); }; } // End of namespace Titanic |