mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
GRAPHICS: MACGUI: Fix fgcolor conversion in MacText
This commit is contained in:
committed by
Eugene Sandulenko
parent
2f16bf2e9f
commit
b9003c145f
@@ -429,7 +429,7 @@ const Common::U32String::value_type *MacTextCanvas::splitString(const Common::U3
|
||||
|
||||
D(9, "** splitString[i]: %d%% fname: '%s' alt: '%s' title: '%s' ext: '%s'",
|
||||
_text[curLine].picpercent,
|
||||
_text[curLine].picfname.c_str(), _text[curLine].picalt.encode().c_str(),
|
||||
_text[curLine].picfname.toString().c_str(), _text[curLine].picalt.encode().c_str(),
|
||||
_text[curLine].pictitle.encode().c_str(), _text[curLine].picext.encode().c_str());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -125,7 +125,11 @@ MacText::MacText(MacWidget *parent, int x, int y, int w, int h, MacWindowManager
|
||||
_defaultFormatting = MacFontRun(_wm);
|
||||
_defaultFormatting.font = wm->_fontMan->getFont(*macFont);
|
||||
byte r, g, b;
|
||||
_wm->_pixelformat.colorToRGB(fgcolor, r, g, b);
|
||||
if (_wm->_pixelformat.bytesPerPixel == 4) {
|
||||
_wm->decomposeColor<uint32>(fgcolor, r, g, b);
|
||||
} else {
|
||||
_wm->decomposeColor<byte>(fgcolor, r, g, b);
|
||||
}
|
||||
_defaultFormatting.setValues(_wm, macFont->getId(), macFont->getSlant(), macFont->getSize(), r, g, b);
|
||||
} else {
|
||||
_defaultFormatting.font = NULL;
|
||||
|
||||
Reference in New Issue
Block a user