aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/titanic/pet_control/pet_conversations.cpp24
-rw-r--r--engines/titanic/pet_control/pet_conversations.h14
-rw-r--r--engines/titanic/pet_control/pet_section.h15
3 files changed, 40 insertions, 13 deletions
diff --git a/engines/titanic/pet_control/pet_conversations.cpp b/engines/titanic/pet_control/pet_conversations.cpp
index 8f0450c4c5..677635391c 100644
--- a/engines/titanic/pet_control/pet_conversations.cpp
+++ b/engines/titanic/pet_control/pet_conversations.cpp
@@ -27,7 +27,7 @@
namespace Titanic {
CPetConversations::CPetConversations() : CPetSection(),
- _logScrolled(false), _field418(0) {
+ _logChanged(false), _field418(0) {
}
bool CPetConversations::isValid(CPetControl *petControl) {
@@ -138,7 +138,7 @@ void CPetConversations::leave() {
stopNPCTimer();
}
-void CPetConversations::displayNPC(CGameObject *npc) {
+void CPetConversations::displayNPCName(CGameObject *npc) {
if (npc) {
displayMessage(CString());
CString msg = "Talking to ";
@@ -180,6 +180,14 @@ void CPetConversations::displayNPC(CGameObject *npc) {
}
}
+void CPetConversations::showCursor() {
+ _textInput.showCursor(-2);
+}
+
+void CPetConversations::hideCursor() {
+ _textInput.hideCursor();
+}
+
bool CPetConversations::setupControl(CPetControl *petControl) {
if (petControl) {
_petControl = petControl;
@@ -226,42 +234,42 @@ void CPetConversations::scrollUp() {
_log.scrollUp(CScreenManager::_screenManagerPtr);
if (_petControl)
_petControl->makeDirty();
- _logScrolled = true;
+ _logChanged = true;
}
void CPetConversations::scrollDown() {
_log.scrollDown(CScreenManager::_screenManagerPtr);
if (_petControl)
_petControl->makeDirty();
- _logScrolled = true;
+ _logChanged = true;
}
void CPetConversations::scrollUpPage() {
_log.scrollUpPage(CScreenManager::_screenManagerPtr);
if (_petControl)
_petControl->makeDirty();
- _logScrolled = true;
+ _logChanged = true;
}
void CPetConversations::scrollDownPage() {
_log.scrollDownPage(CScreenManager::_screenManagerPtr);
if (_petControl)
_petControl->makeDirty();
- _logScrolled = true;
+ _logChanged = true;
}
void CPetConversations::scrollToTop() {
_log.scrollToTop(CScreenManager::_screenManagerPtr);
if (_petControl)
_petControl->makeDirty();
- _logScrolled = true;
+ _logChanged = true;
}
void CPetConversations::scrollToBottom() {
_log.scrollToBottom(CScreenManager::_screenManagerPtr);
if (_petControl)
_petControl->makeDirty();
- _logScrolled = true;
+ _logChanged = true;
}
int CPetConversations::canSummonNPC(const CString &name) {
diff --git a/engines/titanic/pet_control/pet_conversations.h b/engines/titanic/pet_control/pet_conversations.h
index ad993ec3b2..79f6b59bdc 100644
--- a/engines/titanic/pet_control/pet_conversations.h
+++ b/engines/titanic/pet_control/pet_conversations.h
@@ -48,7 +48,7 @@ private:
CPetText _log;
CPetText _textInput;
int _valArray3[3];
- bool _logScrolled;
+ bool _logChanged;
int _field418;
CString _npcName;
private:
@@ -176,7 +176,17 @@ public:
/**
* Display a title for an NPC
*/
- virtual void displayNPC(CGameObject *npc);
+ virtual void displayNPCName(CGameObject *npc);
+
+ /**
+ * Show the text cursor
+ */
+ virtual void showCursor();
+
+ /**
+ * Hide the text cursor
+ */
+ virtual void hideCursor();
};
} // End of namespace Titanic
diff --git a/engines/titanic/pet_control/pet_section.h b/engines/titanic/pet_control/pet_section.h
index 995feee27b..692c8b9100 100644
--- a/engines/titanic/pet_control/pet_section.h
+++ b/engines/titanic/pet_control/pet_section.h
@@ -156,13 +156,22 @@ public:
/**
* Display a title for an NPC
*/
- virtual void displayNPC(CGameObject *npc);
+ virtual void displayNPCName(CGameObject *npc) {}
virtual void proc33() {}
virtual void proc34() {}
virtual void proc35() {}
- virtual void proc36() {}
- virtual void proc37() {}
+
+ /**
+ * Show the text cursor
+ */
+ virtual void showCursor() {}
+
+ /**
+ * Hide the text cursor
+ */
+ virtual void hideCursor() {}
+
virtual void proc38(int val) {}
/**