DIRECTOR: Set default TextCastMember fgcolor from Stxt

Needed to e.g. display a white blinking cursor on a black background.
This commit is contained in:
Scott Percival 2024-01-15 21:21:05 +08:00 committed by Eugene Sandulenko
parent b9003c145f
commit 5427b3815e

View File

@ -225,6 +225,9 @@ void TextCastMember::importStxt(const Stxt *stxt) {
_fgpalinfo1 = stxt->_style.r;
_fgpalinfo2 = stxt->_style.g;
_fgpalinfo3 = stxt->_style.b;
// The default color in the Stxt will override the fgcolor,
// e.g. empty editable text boxes will use the Stxt color
_fgcolor = g_director->_wm->findBestColor(_fgpalinfo1 >> 8, _fgpalinfo2 >> 8, _fgpalinfo3 >> 8);
_ftext = stxt->_ftext;
_ptext = stxt->_ptext;
_rtext = stxt->_rtext;