[Scummvm-cvs-logs] SF.net SVN: scummvm:[45924] scummvm/trunk/engines/teenagent
megath at users.sourceforge.net
megath at users.sourceforge.net
Sun Nov 15 18:43:48 CET 2009
Revision: 45924
http://scummvm.svn.sourceforge.net/scummvm/?rev=45924&view=rev
Author: megath
Date: 2009-11-15 17:43:47 +0000 (Sun, 15 Nov 2009)
Log Message:
-----------
do not close inventory while displaying `examine` message.
Modified Paths:
--------------
scummvm/trunk/engines/teenagent/inventory.cpp
scummvm/trunk/engines/teenagent/scene.cpp
scummvm/trunk/engines/teenagent/scene.h
Modified: scummvm/trunk/engines/teenagent/inventory.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/inventory.cpp 2009-11-15 14:14:49 UTC (rev 45923)
+++ scummvm/trunk/engines/teenagent/inventory.cpp 2009-11-15 17:43:47 UTC (rev 45924)
@@ -28,6 +28,7 @@
#include "teenagent/resources.h"
#include "teenagent/objects.h"
#include "teenagent/teenagent.h"
+#include "teenagent/scene.h"
namespace TeenAgent {
@@ -157,10 +158,13 @@
if (hovered_obj == NULL)
return true;
+
+ debug(0, "lclick on %u:%s", hovered_obj->id, hovered_obj->name.c_str());
if (selected_obj == NULL) {
- activate(false);
- _engine->displayMessage(hovered_obj->description);
+ //activate(false);
+ int w = res->font7.render(NULL, 0, 0, hovered_obj->description, 0xd1);
+ _engine->scene->displayMessage(hovered_obj->description, 0xd1, Common::Point((320 - w) / 2, 162));
return true;
}
Modified: scummvm/trunk/engines/teenagent/scene.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/scene.cpp 2009-11-15 14:14:49 UTC (rev 45923)
+++ scummvm/trunk/engines/teenagent/scene.cpp 2009-11-15 17:43:47 UTC (rev 45924)
@@ -1014,11 +1014,11 @@
}
-void Scene::displayMessage(const Common::String &str, byte color) {
+void Scene::displayMessage(const Common::String &str, byte color, const Common::Point &pos) {
//assert(!str.empty());
//debug(0, "displayMessage: %s", str.c_str());
message = str;
- message_pos = messagePosition(str, position);
+ message_pos = (pos.x | pos.y)? pos: messagePosition(str, position);
message_color = color;
message_timer = messageDuration(message);
}
Modified: scummvm/trunk/engines/teenagent/scene.h
===================================================================
--- scummvm/trunk/engines/teenagent/scene.h 2009-11-15 14:14:49 UTC (rev 45923)
+++ scummvm/trunk/engines/teenagent/scene.h 2009-11-15 17:43:47 UTC (rev 45924)
@@ -130,7 +130,7 @@
void moveTo(const Common::Point &point, byte orientation = 0, bool validate = 0);
Common::Point getPosition() const { return position; }
- void displayMessage(const Common::String &str, byte color = 0xd1);
+ void displayMessage(const Common::String &str, byte color = 0xd1, const Common::Point &pos = Common::Point());
void setOrientation(uint8 o) { orientation = o; }
void push(const SceneEvent &event);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list