GRAPHICS: MACGUI: Properly clean MacEditableText before rendering

This commit is contained in:
Eugene Sandulenko 2020-04-25 01:16:25 +02:00
parent f382d0fd01
commit e01893cfc7

View File

@ -89,9 +89,10 @@ void MacEditableText::init() {
_cursorRect = new Common::Rect(0, 0, 1, kCursorHeight);
_cursorSurface = new ManagedSurface(1, kCursorHeight);
_cursorSurface->fillRect(*_cursorRect, _wm->_colorBlack);
_cursorSurface->clear(_wm->_colorBlack);
_composeSurface = new ManagedSurface(_dims.width(), _dims.height());
_composeSurface->clear(_wm->_colorWhite);
g_system->getTimerManager()->installTimerProc(&cursorTimerHandler, 200000, this, "macEditableText");
}
@ -443,9 +444,6 @@ void MacEditableText::undrawInput() {
for (uint i = 0; i < _inputTextHeight; i++)
MacText::removeLastLine();
if (_inputTextHeight)
appendText("\n", _font, true);
_inputTextHeight = 0;
}