diff options
author | vanfanel | 2015-11-11 17:56:12 +0100 |
---|---|---|
committer | vanfanel | 2015-11-11 17:56:12 +0100 |
commit | 99739a13fe844c807d3cdd87e67e207e888fd48a (patch) | |
tree | 6afbf4763326277efbf528f0bb9e587bf7a01788 /engines/hugo | |
parent | 37e157a11c3fc731dfdcf6ec6b6a5a448550219b (diff) | |
parent | 7e44493fe8877a3c6a65f83b9ed84a5f59169005 (diff) | |
download | scummvm-rg350-99739a13fe844c807d3cdd87e67e207e888fd48a.tar.gz scummvm-rg350-99739a13fe844c807d3cdd87e67e207e888fd48a.tar.bz2 scummvm-rg350-99739a13fe844c807d3cdd87e67e207e888fd48a.zip |
Merge branch 'master' into dispmanx
Diffstat (limited to 'engines/hugo')
-rw-r--r-- | engines/hugo/mouse.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/engines/hugo/mouse.cpp b/engines/hugo/mouse.cpp index 558a596b35..3674c90757 100644 --- a/engines/hugo/mouse.cpp +++ b/engines/hugo/mouse.cpp @@ -121,12 +121,24 @@ void MouseHandler::cursorText(const char *buffer, const int16 cx, const int16 cy int16 sx, sy; if (cx < kXPix / 2) { sx = cx + kCursorNameOffX; - sy = (_vm->_inventory->getInventoryObjId() == -1) ? cy + kCursorNameOffY : cy + kCursorNameOffY - (_vm->_screen->fontHeight() + 1); + if (_vm->_inventory->getInventoryObjId() == -1) { + sy = cy + kCursorNameOffY; + } else { + sy = cy + kCursorNameOffY - (_vm->_screen->fontHeight() + 1); + if (sy < 0) { + sx = cx + kCursorNameOffX + 25; + sy = cy + kCursorNameOffY; + } + } } else { sx = cx - sdx - kCursorNameOffX / 2; sy = cy + kCursorNameOffY; } + if (sy < 0) { + sy = 0; + } + // Display the string and add rect to display list _vm->_screen->shadowStr(sx, sy, buffer, _TBRIGHTWHITE); _vm->_screen->displayList(kDisplayAdd, sx, sy, sdx, sdy); |