aboutsummaryrefslogtreecommitdiff
path: root/engines/pink/objects
diff options
context:
space:
mode:
authorAndrei Prykhodko2018-08-05 22:08:54 +0300
committerAndrei Prykhodko2018-08-05 22:08:54 +0300
commitc255de107d3dc57e210857a7bf34847e36f3dc0c (patch)
tree73ed398d00ceb5f1d21717824e00aca5c86bcbea /engines/pink/objects
parentca54a720721d1ffb827b1573da7857b75227c1df (diff)
downloadscummvm-rg350-c255de107d3dc57e210857a7bf34847e36f3dc0c.tar.gz
scummvm-rg350-c255de107d3dc57e210857a7bf34847e36f3dc0c.tar.bz2
scummvm-rg350-c255de107d3dc57e210857a7bf34847e36f3dc0c.zip
PINK: implemented text drawing in ActionText for English version
Diffstat (limited to 'engines/pink/objects')
-rw-r--r--engines/pink/objects/actions/action_text.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/pink/objects/actions/action_text.cpp b/engines/pink/objects/actions/action_text.cpp
index 174ad8c65f..ea7d486327 100644
--- a/engines/pink/objects/actions/action_text.cpp
+++ b/engines/pink/objects/actions/action_text.cpp
@@ -77,6 +77,11 @@ void ActionText::start() {
findColorsInPalette();
Director *director = _actor->getPage()->getGame()->getDirector();
Graphics::TextAlign align = _centered ? Graphics::kTextAlignCenter : Graphics::kTextAlignLeft;
+ Common::SeekableReadStream *stream = _actor->getPage()->getResourceStream(_fileName);
+
+ char *str = new char[stream->size()];
+ stream->read(str, stream->size());
+ delete stream;
if (_scrollBar) {
Graphics::MacFont *font = new Graphics::MacFont;
@@ -85,10 +90,12 @@ void ActionText::start() {
_txtWnd->move(_xLeft, _yTop);
_txtWnd->resize(_xRight - _xLeft, _yBottom - _yTop);
- _txtWnd->appendText("Testing ActionText", font);
+ if (_actor->getPage()->getGame()->getGameDesc().language == Common::EN_ANY)
+ _txtWnd->appendText(str, font);
} else {
director->addTextAction(this);
}
+ delete[] str;
}
void ActionText::end() {