From 1351703dc0f911cb94d73275371007132295bbdd Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Thu, 12 Nov 2009 13:01:35 +0000 Subject: SCI/newgui: SciGuiMenu adjustment, when no right aligned text is available at all (makes lsl6 menu pixel perfect) svn-id: r45860 --- engines/sci/gui/gui_menu.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engines/sci/gui') 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)) { -- cgit v1.2.3