diff options
author | VelocityRa | 2017-04-03 04:51:16 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2017-07-17 23:45:22 +0200 |
commit | 0f65852d2f8f4ea2814cb7f626617e6b7c27f49f (patch) | |
tree | 17331a4c6645f08e15237acae9259219fbf76898 /engines/wage/gui-console.cpp | |
parent | fe63eb764452affbc2a1f5884b1bb5d95ede7ee7 (diff) | |
download | scummvm-rg350-0f65852d2f8f4ea2814cb7f626617e6b7c27f49f.tar.gz scummvm-rg350-0f65852d2f8f4ea2814cb7f626617e6b7c27f49f.tar.bz2 scummvm-rg350-0f65852d2f8f4ea2814cb7f626617e6b7c27f49f.zip |
WAGE: Experimental MacText(Window) console rendering
Currently the font specified in the constructor is not
being used, I explain why in gui.cpp, line 182.
Use the 2 defines in gui.h to specify whether:
1) The new text rendering in general is used
(USE_NEW_TEXT_RENDERER)
2) The MacTextWindow class is used
for rendering (USE_MACTEXTWINDOW)
Diffstat (limited to 'engines/wage/gui-console.cpp')
-rw-r--r-- | engines/wage/gui-console.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/engines/wage/gui-console.cpp b/engines/wage/gui-console.cpp index 37031f0dd9..19b2c5224f 100644 --- a/engines/wage/gui-console.cpp +++ b/engines/wage/gui-console.cpp @@ -249,8 +249,18 @@ void Gui::renderConsole(Graphics::ManagedSurface *g, const Common::Rect &r) { font->drawString(&_console, end, x1 + rectW2 - kConWPadding - kConWOverlap, y1, textW, kColorBlack); } } else { - if (*str) + if (*str) { font->drawString(&_console, _lines[line], x1, y1, textW, color); + + // TODO: Take into account color (and maybe position) +#ifdef USE_NEW_TEXT_RENDERER +#ifdef USE_MACTEXTWINDOW + _consoleWindow->appendText(_lines[line]); +#else + _mactext->appendText(_lines[line]); +#endif // USE_MACTEXTWINDOW +#endif // USE_OLD_TEXT_RENDERER + } } y1 += _consoleLineHeight; @@ -278,6 +288,14 @@ void Gui::renderConsole(Graphics::ManagedSurface *g, const Common::Rect &r) { if (rr.bottom > _screen.h - 1) rr.bottom = _screen.h - 1; +#ifdef USE_NEW_TEXT_RENDERER +#ifdef USE_MACTEXTWINDOW + _consoleWindow->drawText(&_console, xcon, ycon, rr.width() - xcon, rr.height() - ycon, rr.left, rr.top); +#else + _mactext->draw(&_console, xcon, ycon, rr.width() - xcon, rr.height() - ycon, rr.left, rr.top); +#endif // USE_MACTEXTWINDOW +#endif // USE_NEW_TEXT_RENDERER + g->copyRectToSurface(_console, xcon, ycon, boundsR); } |