aboutsummaryrefslogtreecommitdiff
path: root/engines/wage/gui-console.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2016-04-24 10:47:09 +0200
committerEugene Sandulenko2016-04-24 10:47:09 +0200
commit9877abe93697c016d18f7fee1c252577e6fd47df (patch)
tree6ddd7ffedecefae9ab80ea7f9f1417273d245855 /engines/wage/gui-console.cpp
parentb4a2361bf726dfd7939b70e62fd902d80d73161f (diff)
downloadscummvm-rg350-9877abe93697c016d18f7fee1c252577e6fd47df.tar.gz
scummvm-rg350-9877abe93697c016d18f7fee1c252577e6fd47df.tar.bz2
scummvm-rg350-9877abe93697c016d18f7fee1c252577e6fd47df.zip
WAGE: Implemented window resizing
Diffstat (limited to 'engines/wage/gui-console.cpp')
-rw-r--r--engines/wage/gui-console.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/wage/gui-console.cpp b/engines/wage/gui-console.cpp
index ea66826c3b..ca1917b96d 100644
--- a/engines/wage/gui-console.cpp
+++ b/engines/wage/gui-console.cpp
@@ -114,7 +114,7 @@ enum {
void Gui::flowText(Common::String &str) {
Common::StringArray wrappedLines;
- int textW = _consoleTextArea.width() - kConWPadding * 2;
+ int textW = _consoleWindow->getInnerDimensions().width() - kConWPadding * 2;
const Graphics::Font *font = getConsoleFont();
font->wordWrapText(str, textW, wrappedLines);
@@ -297,17 +297,17 @@ void Gui::drawInput() {
if (_engine->_inputText.contains('\n')) {
_consoleDirty = true;
} else {
- int x = kConWPadding + _consoleTextArea.left;
- int y = _cursorY + _consoleTextArea.top;
+ int x = kConWPadding + _consoleWindow->getInnerDimensions().left;
+ int y = _cursorY + _consoleWindow->getInnerDimensions().top;
- Common::Rect r(x, y, x + _consoleTextArea.width() - kConWPadding, y + font->getFontHeight());
+ Common::Rect r(x, y, x + _consoleWindow->getInnerDimensions().width() - kConWPadding, y + font->getFontHeight());
_screen.fillRect(r, kColorWhite);
undrawCursor();
font->drawString(&_screen, _out[_inputTextLineNum], x, y, _screen.w, kColorBlack);
- g_system->copyRectToScreen(_screen.getBasePtr(x, y), _screen.pitch, x, y, _consoleTextArea.width(), font->getFontHeight());
+ g_system->copyRectToScreen(_screen.getBasePtr(x, y), _screen.pitch, x, y, _consoleWindow->getInnerDimensions().width(), font->getFontHeight());
}
_cursorX = font->getStringWidth(_out[_inputTextLineNum]) + kConHPadding;