[Scummvm-cvs-logs] SF.net SVN: scummvm:[55181] scummvm/trunk/engines/hugo/mouse.cpp

strangerke at users.sourceforge.net strangerke at users.sourceforge.net
Sun Jan 9 11:16:56 CET 2011


Revision: 55181
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55181&view=rev
Author:   strangerke
Date:     2011-01-09 10:16:55 +0000 (Sun, 09 Jan 2011)

Log Message:
-----------
HUGO: Modify hint position when an object is selected

Modified Paths:
--------------
    scummvm/trunk/engines/hugo/mouse.cpp

Modified: scummvm/trunk/engines/hugo/mouse.cpp
===================================================================
--- scummvm/trunk/engines/hugo/mouse.cpp	2011-01-09 10:14:40 UTC (rev 55180)
+++ scummvm/trunk/engines/hugo/mouse.cpp	2011-01-09 10:16:55 UTC (rev 55181)
@@ -74,8 +74,14 @@
 	// Find bounding rect for string
 	int16 sdx = _vm->_screen->stringLength(buffer);
 	int16 sdy = _vm->_screen->fontHeight() + 1;                      // + 1 for shadow
-	int16 sx  = (cx < XPIX / 2) ? cx + SX_OFF : cx - sdx - SX_OFF / 2;
-	int16 sy  = cy + SY_OFF;
+	int16 sx, sy;
+	if (cx < XPIX / 2) {
+		sx = cx + SX_OFF;
+		sy = (_vm->getGameStatus().inventoryObjId == -1) ? cy + SY_OFF : cy + SY_OFF - (_vm->_screen->fontHeight() + 1);
+	} else {
+		sx = cx - sdx - SX_OFF / 2;
+		sy = cy + SY_OFF;
+	}
 
 	// Display the string and add rect to display list
 	_vm->_screen->shadowStr(sx, sy, buffer, _TBRIGHTWHITE);


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