aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2010-04-17 13:42:19 +0000
committerMartin Kiewitz2010-04-17 13:42:19 +0000
commit2ac3e93dab227fb69e9fe1a8f9ec8c56c6520dd4 (patch)
tree2e3c5fe57bba3f4eecd7dc23c6320a9441becc9e
parent08ad84d5565131f5422a270046f6702243d55a50 (diff)
downloadscummvm-rg350-2ac3e93dab227fb69e9fe1a8f9ec8c56c6520dd4.tar.gz
scummvm-rg350-2ac3e93dab227fb69e9fe1a8f9ec8c56c6520dd4.tar.bz2
scummvm-rg350-2ac3e93dab227fb69e9fe1a8f9ec8c56c6520dd4.zip
SCI: move menu window inside the screen, if parts of it are outside (happens in multilingual sq3 and lsl3)
svn-id: r48686
-rw-r--r--engines/sci/graphics/menu.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/sci/graphics/menu.cpp b/engines/sci/graphics/menu.cpp
index 124c8cc084..a4994ea443 100644
--- a/engines/sci/graphics/menu.cpp
+++ b/engines/sci/graphics/menu.cpp
@@ -540,6 +540,11 @@ void GfxMenu::drawMenu(uint16 oldMenuId, uint16 newMenuId) {
if (!maxTextRightAlignedWidth)
_menuRect.right -= 5;
+ // if part of menu window is outside the screen, move it into the screen (this happens in multilingual sq3 and lsl3)
+ if (_menuRect.right > _screen->getWidth()) {
+ _menuRect.translate(-(_menuRect.right - _screen->getWidth()), 0);
+ }
+
// Save background
_menuSaveHandle = _paint16->bitsSave(_menuRect, SCI_SCREEN_MASK_VISUAL);