diff options
author | Paul Gilbert | 2016-06-19 22:20:32 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-15 19:23:51 -0400 |
commit | cafde797732d62241207fb39b66456a69a0eb3c1 (patch) | |
tree | 649e8124fab032aaf0a8bd07a41b9d72ddb8209d /engines/titanic/pet_control | |
parent | 701caa956ca652256504a1dd6a82e24a853323ac (diff) | |
download | scummvm-rg350-cafde797732d62241207fb39b66456a69a0eb3c1.tar.gz scummvm-rg350-cafde797732d62241207fb39b66456a69a0eb3c1.tar.bz2 scummvm-rg350-cafde797732d62241207fb39b66456a69a0eb3c1.zip |
TITANIC: Added PET cursor related methods
Diffstat (limited to 'engines/titanic/pet_control')
-rw-r--r-- | engines/titanic/pet_control/pet_control.cpp | 12 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_control.h | 17 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_remote.cpp | 4 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_remote.h | 5 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_section.h | 5 |
5 files changed, 35 insertions, 8 deletions
diff --git a/engines/titanic/pet_control/pet_control.cpp b/engines/titanic/pet_control/pet_control.cpp index 37af6f7d0a..bc2ab036b2 100644 --- a/engines/titanic/pet_control/pet_control.cpp +++ b/engines/titanic/pet_control/pet_control.cpp @@ -211,8 +211,16 @@ PetArea CPetControl::setArea(PetArea newArea) { return newArea; } -void CPetControl::fn2(int val) { - _sections[_currentArea]->proc38(val); +void CPetControl::hideCursor() { + _sections[_currentArea]->hideCursor(); +} + +void CPetControl::showCursor() { + _sections[_currentArea]->showCursor(); +} + +void CPetControl::highlightGlyph(int id) { + _sections[_currentArea]->highlight(id); } void CPetControl::fn3(CTreeItem *item) { diff --git a/engines/titanic/pet_control/pet_control.h b/engines/titanic/pet_control/pet_control.h index 71785cedb6..3dee76fea6 100644 --- a/engines/titanic/pet_control/pet_control.h +++ b/engines/titanic/pet_control/pet_control.h @@ -163,8 +163,6 @@ public: bool fn1(int val); - void fn2(int val); - void fn3(CTreeItem *item); void fn4(); @@ -175,6 +173,21 @@ public: PetArea setArea(PetArea newSection); /** + * Hides the text cursor in the current section, if applicable + */ + void hideCursor(); + + /** + * Shows the text cursor in the current section, if applicable + */ + void showCursor(); + + /** + * Highlights a glyph item in the currently active section, if applicable + */ + void highlightGlyph(int id); + + /** * Returns true if the PET is currently unlocked */ bool isUnlocked() const { return _locked == 0; } diff --git a/engines/titanic/pet_control/pet_remote.cpp b/engines/titanic/pet_control/pet_remote.cpp index aac0dc8146..6f133259a8 100644 --- a/engines/titanic/pet_control/pet_remote.cpp +++ b/engines/titanic/pet_control/pet_remote.cpp @@ -214,8 +214,8 @@ CPetGfxElement *CPetRemote::getElement(uint id) { } } -void CPetRemote::proc38(int val) { - int highlightIndex = getHighlightIndex((RemoteGlyph)val); +void CPetRemote::highlight(int id) { + int highlightIndex = getHighlightIndex((RemoteGlyph)id); if (highlightIndex != -1) _items.highlight(highlightIndex); } diff --git a/engines/titanic/pet_control/pet_remote.h b/engines/titanic/pet_control/pet_remote.h index 8703abd099..58c429f5bf 100644 --- a/engines/titanic/pet_control/pet_remote.h +++ b/engines/titanic/pet_control/pet_remote.h @@ -143,7 +143,10 @@ public: */ virtual CPetGfxElement *getElement(uint id); - virtual void proc38(int val); + /** + * Highlights a glyph item in the section + */ + virtual void highlight(int id); /** * Generates a PET message diff --git a/engines/titanic/pet_control/pet_section.h b/engines/titanic/pet_control/pet_section.h index 52890fc79a..15c4033e8b 100644 --- a/engines/titanic/pet_control/pet_section.h +++ b/engines/titanic/pet_control/pet_section.h @@ -182,7 +182,10 @@ public: */ virtual void hideCursor() {} - virtual void proc38(int val) {} + /** + * Highlights a glyph item in the section, if applicable + */ + virtual void highlight(int id) {} /** * Get the PET control |