hi Denis,<br><br><div class="gmail_quote">On Tue, Aug 4, 2009 at 5:11 PM,  <span dir="ltr"><<a href="mailto:dkasak13@users.sourceforge.net">dkasak13@users.sourceforge.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Modified: scummvm/branches/gsoc2009-draci/engines/draci/game.cpp<br>
===================================================================<br>
--- scummvm/branches/gsoc2009-draci/engines/draci/game.cpp      2009-08-05 00:05:36 UTC (rev 43058)<br>
+++ scummvm/branches/gsoc2009-draci/engines/draci/game.cpp      2009-08-05 00:11:09 UTC (rev 43059)<br>                       if (curObject != kNotFound) {<br>
-                               titleAnim->markDirtyRect(_vm->_screen->getSurface());<br>
-                               reinterpret_cast<Text *>(titleAnim->getFrame())->setText(obj->_title);<br>
+                               // Mark dirty rectangle to update the text<br>
+                               titleAnim->markDirtyRect(surface);<br>
<br>
+                               // Set the title for the current object<br>
+                               title->setText(obj->_title);<br>
+<br>
+                               // Move the title to the correct place (just above the cursor)<br>
+                               int newX = surface->centerOnX(x, title->getWidth());<br>
+                               int newY = surface->centerOnY(y - smallFontHeight / 2, title->getHeight() * 2);<br>
+                               titleAnim->setRelative(newX, newY);</blockquote><div><br></div><div>should you not call markDirtyRect() twice, once before changing the position and once after?  two places need to be redrawn if the mouse quickly moves from one object to another one: deletion of the previous text and addition of the new one.</div>

<div> </div></div>-- <br>Robert Špalek <<a href="mailto:rspalek@gmail.com">rspalek@gmail.com</a>><br>