DIRECTOR: Properly set CachedMacText

This commit is contained in:
Eugene Sandulenko 2019-12-11 21:44:37 +01:00
parent a35259dc0d
commit 23cf5d4bbb
2 changed files with 5 additions and 1 deletions

View File

@ -38,7 +38,7 @@ class TextCast;
class CachedMacText {
private:
int _width;
TextCast *const _textCast;
const TextCast *_textCast;
Graphics::MacWindowManager *_wm;
Graphics::MacText *_macText;
Graphics::TextAlign _align;
@ -56,6 +56,8 @@ public:
void forceDirty();
const Graphics::ManagedSurface *getSurface();
int getLineCount();
void setStxt(const TextCast *stxt) { _textCast = stxt; forceDirty(); }
};
} // End of namespace Director

View File

@ -215,6 +215,8 @@ void TextCast::importStxt(const Stxt *stxt) {
_palinfo2 = stxt->_palinfo2;
_palinfo3 = stxt->_palinfo3;
_ftext = stxt->_ftext;
_cachedMacText->setStxt(this);
}
void TextCast::importRTE(byte *text) {