aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2009-11-12 13:01:35 +0000
committerMartin Kiewitz2009-11-12 13:01:35 +0000
commit1351703dc0f911cb94d73275371007132295bbdd (patch)
tree3eba029a4fbae2499c454b6ee61dd44ed84a72a6
parentd1dc586aa39cbcc2b1f8136f50494d0bb5fc9757 (diff)
downloadscummvm-rg350-1351703dc0f911cb94d73275371007132295bbdd.tar.gz
scummvm-rg350-1351703dc0f911cb94d73275371007132295bbdd.tar.bz2
scummvm-rg350-1351703dc0f911cb94d73275371007132295bbdd.zip
SCI/newgui: SciGuiMenu adjustment, when no right aligned text is available at all (makes lsl6 menu pixel perfect)
svn-id: r45860
-rw-r--r--engines/sci/gui/gui_menu.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/sci/gui/gui_menu.cpp b/engines/sci/gui/gui_menu.cpp
index 34e6394329..21845ffbfb 100644
--- a/engines/sci/gui/gui_menu.cpp
+++ b/engines/sci/gui/gui_menu.cpp
@@ -491,6 +491,8 @@ void SciGuiMenu::drawMenu(uint16 oldMenuId, uint16 newMenuId) {
}
_menuRect.right = _menuRect.left + 16 + 4 + 2;
_menuRect.right += maxTextWidth + maxTextRightAlignedWidth;
+ if (!maxTextRightAlignedWidth)
+ _menuRect.right -= 5;
// Save background
_menuSaveHandle = _gfx->BitsSave(_menuRect, SCI_SCREEN_MASK_VISUAL);
@@ -513,6 +515,7 @@ void SciGuiMenu::drawMenu(uint16 oldMenuId, uint16 newMenuId) {
_text->Draw_String(listItemEntry->textRightAligned.c_str());
} else {
// We dont 100% follow sierra here, we draw the line from left to right. Looks better
+ // BTW. SCI1.1 seems to put 2 pixels and then skip one, we don't do this at all (lsl6)
pixelPos.y = topPos + (_gfx->_curPort->fontHeight >> 1) - 1;
pixelPos.x = _menuRect.left - 7;
while (pixelPos.x < (_menuRect.right - 1)) {