mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 06:41:51 +00:00
PINK: implemented text drawing in ActionText for English version
This commit is contained in:
parent
ca54a72072
commit
c255de107d
@ -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() {
|
||||
|
@ -115,6 +115,7 @@ public:
|
||||
|
||||
void executeMenuCommand(uint id);
|
||||
|
||||
const ADGameDescription &getGameDesc() { return _desc; }
|
||||
OrbFile *getOrb() { return &_orb; }
|
||||
BroFile *getBro() { return _bro; }
|
||||
Common::RandomSource &getRnd() { return _rnd; };
|
||||
|
@ -55,14 +55,6 @@ void ResourceMgr::clear() {
|
||||
_resDescTable = nullptr;
|
||||
}
|
||||
|
||||
Common::String ResourceMgr::loadText(Common::String &name) {
|
||||
Common::SeekableReadStream *stream = getResourceStream(name);
|
||||
char *txt = new char[stream->size()];
|
||||
Common::String str(txt, stream->size());
|
||||
delete [] txt;
|
||||
return str;
|
||||
}
|
||||
|
||||
static int resDescComp(const void *a, const void *b) {
|
||||
return scumm_stricmp((const char *)a, (const char *)b);
|
||||
}
|
||||
|
@ -52,8 +52,6 @@ public:
|
||||
|
||||
Common::SafeSeekableSubReadStream *getResourceStream(const Common::String &name);
|
||||
|
||||
Common::String loadText(Common::String &name);
|
||||
|
||||
PinkEngine *getGame() const { return _game; }
|
||||
|
||||
private:
|
||||
|
Loading…
x
Reference in New Issue
Block a user