PINK: delete loading border in pink, it will load in macgui automatically

This commit is contained in:
ysj1173886760 2021-04-21 10:04:06 +08:00 committed by Eugene Sandulenko
parent c317ca1900
commit cd462ba7c7

View File

@ -113,8 +113,6 @@ void ActionText::start() {
_txtWnd = director->getWndManager().addTextWindow(font, _textColorIndex, _backgroundColorIndex,
_xRight - _xLeft, align, nullptr, false);
_txtWnd->enableScrollbar(true);
loadBorder(_txtWnd, "pink_border.bmp", Graphics::kWindowBorderScrollbar | Graphics::kWindowBorderActive);
loadBorder(_txtWnd, "pink_border.bmp", Graphics::kWindowBorderScrollbar);
_txtWnd->move(_xLeft, _yTop);
_txtWnd->resize(_xRight - _xLeft, _yBottom - _yTop);
_txtWnd->setEditable(false);
@ -152,32 +150,6 @@ void ActionText::end() {
}
}
void ActionText::loadBorder(Graphics::MacWindow *target, Common::String filename, uint32 flags) {
Common::File borderfile;
if (!borderfile.open(filename)) {
debug(1, "Cannot open border file");
return;
}
Common::SeekableReadStream *stream = borderfile.readStream(borderfile.size());
if (stream) {
Graphics::BorderOffsets offsets;
offsets.top = 1;
offsets.bottom = 1;
offsets.left = 1;
offsets.right = 17;
offsets.lowerScrollHeight = 15;
offsets.upperScrollHeight = 17;
offsets.titlePos = 0;
target->loadBorder(*stream, flags, offsets);
borderfile.close();
delete stream;
}
}
void ActionText::draw(Graphics::ManagedSurface *surface) {
// alignment not working, thus we implement alignment for center manually
Graphics::TextAlign alignment = _centered ? Graphics::kTextAlignCenter : Graphics::kTextAlignLeft;