aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/pink/objects/actors/actor.cpp2
-rw-r--r--engines/pink/objects/actors/actor.h2
-rw-r--r--engines/pink/objects/actors/audio_info_pda_button.cpp2
-rw-r--r--engines/pink/objects/actors/audio_info_pda_button.h2
-rw-r--r--engines/pink/objects/actors/lead_actor.cpp7
-rw-r--r--engines/pink/objects/actors/lead_actor.h1
-rw-r--r--engines/pink/objects/actors/supporting_actor.cpp4
-rw-r--r--engines/pink/objects/actors/supporting_actor.h2
8 files changed, 13 insertions, 9 deletions
diff --git a/engines/pink/objects/actors/actor.cpp b/engines/pink/objects/actors/actor.cpp
index 4a70e1daef..2725338580 100644
--- a/engines/pink/objects/actors/actor.cpp
+++ b/engines/pink/objects/actors/actor.cpp
@@ -95,7 +95,7 @@ void Actor::onMouseOver(const Common::Point point, CursorMgr *mgr) {
mgr->setCursor(kDefaultCursor, point, Common::String());
}
-void Actor::onHover(const Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr) {
+void Actor::onMouseOverWithItem(const Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr) {
cursorMgr->setCursor(kHoldingItemCursor, point, itemName);
}
diff --git a/engines/pink/objects/actors/actor.h b/engines/pink/objects/actors/actor.h
index 480aa78b72..87d12cf1e6 100644
--- a/engines/pink/objects/actors/actor.h
+++ b/engines/pink/objects/actors/actor.h
@@ -63,7 +63,7 @@ public:
virtual bool isUseClickHandlers(InventoryItem *item) { return false; }
virtual void onMouseOver(const Common::Point point, CursorMgr *mgr);
- virtual void onHover(const Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr);
+ virtual void onMouseOverWithItem(const Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr);
virtual void onClick() {}
diff --git a/engines/pink/objects/actors/audio_info_pda_button.cpp b/engines/pink/objects/actors/audio_info_pda_button.cpp
index a2adad0437..7849b6ddb3 100644
--- a/engines/pink/objects/actors/audio_info_pda_button.cpp
+++ b/engines/pink/objects/actors/audio_info_pda_button.cpp
@@ -37,7 +37,7 @@ void AudioInfoPDAButton::onMouseOver(const Common::Point point, CursorMgr *mgr)
mgr->setCursor(kClickableFirstFrameCursor, point, Common::String());
}
-void AudioInfoPDAButton::onHover(const Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr) {
+void AudioInfoPDAButton::onMouseOverWithItem(const Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr) {
onMouseOver(point, cursorMgr);
}
diff --git a/engines/pink/objects/actors/audio_info_pda_button.h b/engines/pink/objects/actors/audio_info_pda_button.h
index fbff88f65b..6eee840cce 100644
--- a/engines/pink/objects/actors/audio_info_pda_button.h
+++ b/engines/pink/objects/actors/audio_info_pda_button.h
@@ -37,7 +37,7 @@ public:
void toConsole();
void onMouseOver(const Common::Point point, CursorMgr *mgr);
- void onHover(const Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr) override;
+ void onMouseOverWithItem(const Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr) override;
bool onLeftClickMessage() override;
};
diff --git a/engines/pink/objects/actors/lead_actor.cpp b/engines/pink/objects/actors/lead_actor.cpp
index bfbbbb0642..82cf174192 100644
--- a/engines/pink/objects/actors/lead_actor.cpp
+++ b/engines/pink/objects/actors/lead_actor.cpp
@@ -250,7 +250,6 @@ void LeadActor::onRightButtonClick(const Common::Point point) {
}
}
-
void LeadActor::onMouseMove(const Common::Point point) {
if (_state != kPDA)
updateCursor(point);
@@ -258,6 +257,10 @@ void LeadActor::onMouseMove(const Common::Point point) {
_page->getGame()->getPdaMgr().onMouseMove(point);
}
+void LeadActor::onMouseOverWithItem(const Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr) {
+ _cursorMgr->setCursor(kHoldingItemCursor, point, itemName + kClickable);
+}
+
void LeadActor::onMouseOver(const Common::Point point, CursorMgr *mgr) {
if (getInventoryMgr()->isPinkOwnsAnyItems())
_cursorMgr->setCursor(kClickableFirstFrameCursor, point, Common::String());
@@ -339,7 +342,7 @@ void LeadActor::updateCursor(const Common::Point point) {
InventoryItem *item = getInventoryMgr()->getCurrentItem();
if (_isHaveItem) {
if (actor) {
- actor->onHover(point, item->getName(), _cursorMgr);
+ actor->onMouseOverWithItem(point, item->getName(), _cursorMgr);
} else
_cursorMgr->setCursor(kHoldingItemCursor, point, item->getName());
} else if (actor)
diff --git a/engines/pink/objects/actors/lead_actor.h b/engines/pink/objects/actors/lead_actor.h
index 8c2cb7a7b1..d7cafb021f 100644
--- a/engines/pink/objects/actors/lead_actor.h
+++ b/engines/pink/objects/actors/lead_actor.h
@@ -75,6 +75,7 @@ public:
void onMouseMove(const Common::Point point);
+ void onMouseOverWithItem(const Common::Point point, const Common::String &itemName, Pink::CursorMgr *cursorMgr) override;
void onMouseOver(const Common::Point point, CursorMgr *mgr) override;
virtual void onClick();
diff --git a/engines/pink/objects/actors/supporting_actor.cpp b/engines/pink/objects/actors/supporting_actor.cpp
index 3bca41c1d5..744fe6034f 100644
--- a/engines/pink/objects/actors/supporting_actor.cpp
+++ b/engines/pink/objects/actors/supporting_actor.cpp
@@ -64,11 +64,11 @@ void SupportingActor::onMouseOver(const Common::Point point, CursorMgr *mgr) {
Actor::onMouseOver(point, mgr);
}
-void SupportingActor::onHover(const Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr) {
+void SupportingActor::onMouseOverWithItem(const Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr) {
Common::String item = itemName;
if (_handlerMgr.isUseClickHandler(this, itemName))
item += kClickable;
- Actor::onHover(point, item, cursorMgr);
+ cursorMgr->setCursor(kHoldingItemCursor, point, item);
}
void SupportingActor::onTimerMessage() {
diff --git a/engines/pink/objects/actors/supporting_actor.h b/engines/pink/objects/actors/supporting_actor.h
index 1205370c34..88c39963ab 100644
--- a/engines/pink/objects/actors/supporting_actor.h
+++ b/engines/pink/objects/actors/supporting_actor.h
@@ -41,7 +41,7 @@ public:
bool isUseClickHandlers(InventoryItem *item) override;
void onMouseOver(const Common::Point point, CursorMgr *mgr) override;
- void onHover(const Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr) override;
+ void onMouseOverWithItem(const Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr) override;
void onTimerMessage() override;
bool onLeftClickMessage() override;