From 58cd917bba1102be7f0be1708185619bb1978647 Mon Sep 17 00:00:00 2001 From: Vladimir Menshakov Date: Sun, 15 Nov 2009 17:49:26 +0000 Subject: [PATCH] hide mouse while displaying messages, hide item name while displaying item's description. svn-id: r45925 --- engines/teenagent/inventory.cpp | 2 +- engines/teenagent/scene.h | 1 + engines/teenagent/teenagent.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/engines/teenagent/inventory.cpp b/engines/teenagent/inventory.cpp index d822f9c7b4e..c41ade9b2a9 100644 --- a/engines/teenagent/inventory.cpp +++ b/engines/teenagent/inventory.cpp @@ -280,7 +280,7 @@ void Inventory::Item::render(Inventory *inventory, InventoryObject *obj, Graphic } name += obj->name; - if (hovered) { + if (hovered && inventory->_engine->scene->getMessage().empty()) { int w = res->font7.render(NULL, 0, 0, name, 0xd1, true); res->font7.render(dst, (320 - w) / 2, 180, name, 0xd1, true); } diff --git a/engines/teenagent/scene.h b/engines/teenagent/scene.h index ebc8a675877..117e896d341 100644 --- a/engines/teenagent/scene.h +++ b/engines/teenagent/scene.h @@ -150,6 +150,7 @@ public: void loadObjectData(); Animation * getAnimation(byte slot); inline Animation * getActorAnimation() { return &actor_animation; } + inline const Common::String& getMessage() const { return message; } private: void loadOns(); diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp index f6de12b554d..69e84335fe8 100644 --- a/engines/teenagent/teenagent.cpp +++ b/engines/teenagent/teenagent.cpp @@ -278,7 +278,6 @@ Common::Error TeenAgentEngine::run() { Common::Point mouse; do { - _system->showMouse(true); uint32 t0 = _system->getMillis(); Object *current_object = scene->findObject(mouse); @@ -323,6 +322,7 @@ Common::Error TeenAgentEngine::run() { } } + _system->showMouse(scene->getMessage().empty()); uint32 f0 = frame * 10 / 25, f1 = (frame + 1) * 10 / 25; if (f0 != f1) { bool b = scene->render(_system);