hide mouse while displaying messages, hide item name while displaying item's description.

svn-id: r45925
This commit is contained in:
Vladimir Menshakov 2009-11-15 17:49:26 +00:00
parent 274b1306e3
commit 58cd917bba
3 changed files with 3 additions and 2 deletions

View File

@ -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);
}

View File

@ -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();

View File

@ -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);