From 3c8689fb7b8ba5bba07d5bb2a52627c582aa479e Mon Sep 17 00:00:00 2001 From: Arnaud Boutonné Date: Sun, 9 Jan 2011 10:16:55 +0000 Subject: HUGO: Modify hint position when an object is selected svn-id: r55181 --- engines/hugo/mouse.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'engines/hugo/mouse.cpp') diff --git a/engines/hugo/mouse.cpp b/engines/hugo/mouse.cpp index 0855832ab2..035a706b14 100644 --- a/engines/hugo/mouse.cpp +++ b/engines/hugo/mouse.cpp @@ -74,8 +74,14 @@ void MouseHandler::cursorText(char *buffer, int16 cx, int16 cy, uif_t fontId, in // 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); -- cgit v1.2.3