[Scummvm-git-logs] scummvm master -> 4fc031a1e3254f474c728514e83c3831f73efbf5
ysj1173886760
42030331+ysj1173886760 at users.noreply.github.com
Wed Aug 11 12:35:44 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
4fc031a1e3 DIRECTOR: use initial dims to create fixed style text castmember.
Commit: 4fc031a1e3254f474c728514e83c3831f73efbf5
https://github.com/scummvm/scummvm/commit/4fc031a1e3254f474c728514e83c3831f73efbf5
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-08-11T20:35:29+08:00
Commit Message:
DIRECTOR: use initial dims to create fixed style text castmember.
Changed paths:
engines/director/castmember.cpp
diff --git a/engines/director/castmember.cpp b/engines/director/castmember.cpp
index 30476ff377..282bd205b9 100644
--- a/engines/director/castmember.cpp
+++ b/engines/director/castmember.cpp
@@ -753,6 +753,10 @@ Graphics::MacWidget *TextCastMember::createWidget(Common::Rect &bbox, Channel *c
if (_textType == kTextTypeAdjustToFit) {
dims.right = MIN<int>(dims.right, dims.left + _initialRect.width());
dims.bottom = MIN<int>(dims.bottom, dims.top + _initialRect.height());
+ } else if (_textType == kTextTypeFixed){
+ // use initialRect to create widget for fixed style text, this maybe related to version.
+ dims.right = MAX<int>(dims.right, dims.left + _initialRect.width());
+ dims.bottom = MAX<int>(dims.bottom, dims.top + _initialRect.height());
}
widget = new Graphics::MacText(g_director->getCurrentWindow(), bbox.left, bbox.top, dims.width(), dims.height(), g_director->_wm, _ftext, macFont, getForeColor(), getBackColor(), _initialRect.width(), getAlignment(), 0, _borderSize, _gutterSize, _boxShadow, _textShadow, _textType == kTextTypeFixed);
((Graphics::MacText *)widget)->setSelRange(g_director->getCurrentMovie()->_selStart, g_director->getCurrentMovie()->_selEnd);
More information about the Scummvm-git-logs
mailing list