GRAPHICS: MACGUI: save background color for mactextwindow, add new behaviour for win95 mode

This commit is contained in:
ysj1173886760 2021-04-14 16:41:30 +08:00 committed by Eugene Sandulenko
parent 954b66bd44
commit 7ef3b88a94
2 changed files with 9 additions and 1 deletions

View File

@ -52,6 +52,8 @@ MacTextWindow::MacTextWindow(MacWindowManager *wm, const MacFont *font, int fgco
_fontRef = wm->_fontMan->getFont(*font);
_bgcolor = bgcolor;
_inputTextHeight = 0;
_maxWidth = maxWidth;
@ -146,7 +148,11 @@ bool MacTextWindow::draw(bool forceRedraw) {
if (_borderIsDirty || forceRedraw) {
drawBorder();
_composeSurface->clear(_wm->_colorWhite);
if (_wm->_mode & kWMModeWin95) {
_composeSurface->clear(_bgcolor);
} else {
_composeSurface->clear(_wm->_colorWhite);
}
}
if (_inputIsDirty || forceRedraw) {

View File

@ -105,6 +105,8 @@ private:
bool _inputIsDirty;
MacMenu *_menu;
int _bgcolor;
};
} // End of namespace Graphics