mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 05:38:56 +00:00
PINK: fix the bug when we disable the border, the text may not render correctly.
This commit is contained in:
parent
27986beebc
commit
55f61f2c69
@ -112,9 +112,9 @@ void ActionText::start() {
|
||||
Graphics::MacFont *font = new Graphics::MacFont;
|
||||
_txtWnd = director->getWndManager().addTextWindow(font, _textColorIndex, _backgroundColorIndex,
|
||||
_xRight - _xLeft, align, nullptr, false);
|
||||
_txtWnd->enableScrollbar(true);
|
||||
loadBorder(_txtWnd, "pink_border.bmp", Graphics::kWindowBorderScrollbar | Graphics::kWindowBorderActive);
|
||||
loadBorder(_txtWnd, "pink_border.bmp", Graphics::kWindowBorderScrollbar);
|
||||
_txtWnd->enableScrollbar(true);
|
||||
_txtWnd->move(_xLeft, _yTop);
|
||||
_txtWnd->resize(_xRight - _xLeft, _yBottom - _yTop);
|
||||
_txtWnd->setEditable(false);
|
||||
@ -123,10 +123,15 @@ void ActionText::start() {
|
||||
_txtWnd->appendText(_text, font);
|
||||
// if the textHeight is smaller than the area we display the text, then we disable the scrollbar
|
||||
if (_txtWnd->getTextHeight() < _txtWnd->getInnerDimensions().height()) {
|
||||
delete _txtWnd;
|
||||
_txtWnd = director->getWndManager().addTextWindow(font, _textColorIndex, _backgroundColorIndex,
|
||||
_xRight - _xLeft, align, nullptr, false);
|
||||
_txtWnd->disableBorder();
|
||||
_txtWnd->enableScrollbar(false);
|
||||
_txtWnd->move(_xLeft, _yTop);
|
||||
_txtWnd->resize(_xRight - _xLeft, _yBottom - _yTop);
|
||||
_txtWnd->draw(true);
|
||||
_txtWnd->setEditable(false);
|
||||
_txtWnd->setSelectable(false);
|
||||
_txtWnd->appendText(_text, font);
|
||||
}
|
||||
director->addTextWindow(_txtWnd);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user