aboutsummaryrefslogtreecommitdiff
path: root/engines/hugo/mouse.cpp
diff options
context:
space:
mode:
authorArnaud Boutonné2011-01-09 10:16:55 +0000
committerArnaud Boutonné2011-01-09 10:16:55 +0000
commit3c8689fb7b8ba5bba07d5bb2a52627c582aa479e (patch)
tree1180a773fb7c276a85a25d2f3b164fb448d9065d /engines/hugo/mouse.cpp
parent9265c85c4967fa3ae3efba1ca5fe0f315237052a (diff)
downloadscummvm-rg350-3c8689fb7b8ba5bba07d5bb2a52627c582aa479e.tar.gz
scummvm-rg350-3c8689fb7b8ba5bba07d5bb2a52627c582aa479e.tar.bz2
scummvm-rg350-3c8689fb7b8ba5bba07d5bb2a52627c582aa479e.zip
HUGO: Modify hint position when an object is selected
svn-id: r55181
Diffstat (limited to 'engines/hugo/mouse.cpp')
-rw-r--r--engines/hugo/mouse.cpp10
1 files changed, 8 insertions, 2 deletions
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);