aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2016-02-09 11:17:16 +0100
committerEugene Sandulenko2016-02-14 17:13:05 +0100
commit47e3fec8ea6578de6e3cd34241c0685a31167902 (patch)
tree22002ca0615060f1b84404dba7c8a7a989339aa3 /engines
parentc0be640d5e118e4607e1aea82fd089c7a6288d9b (diff)
downloadscummvm-rg350-47e3fec8ea6578de6e3cd34241c0685a31167902.tar.gz
scummvm-rg350-47e3fec8ea6578de6e3cd34241c0685a31167902.tar.bz2
scummvm-rg350-47e3fec8ea6578de6e3cd34241c0685a31167902.zip
WAGE: Firther work on input improvements
Diffstat (limited to 'engines')
-rw-r--r--engines/wage/gui.cpp9
-rw-r--r--engines/wage/wage.cpp1
2 files changed, 5 insertions, 5 deletions
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp
index d7e1233c8a..3ddc508473 100644
--- a/engines/wage/gui.cpp
+++ b/engines/wage/gui.cpp
@@ -578,9 +578,10 @@ void Gui::drawInput() {
_bordersDirty = true;
}
+ _out.pop_back();
_lines.pop_back();
appendText(_engine->_inputText.c_str());
- _inputTextLineNum = _lines.size() - 1;
+ _inputTextLineNum = _out.size() - 1;
const Graphics::Font *font = getConsoleFont();
@@ -590,7 +591,7 @@ void Gui::drawInput() {
int x = kConWPadding + _consoleTextArea.left;
int y = _cursorY + _consoleTextArea.top;
- Common::Rect r(x, y, x + _consoleTextArea.width(), y + font->getFontHeight());
+ Common::Rect r(x, y, x + _consoleTextArea.width() - kConWPadding, y + font->getFontHeight());
_screen.fillRect(r, kColorWhite);
// undraw cursor
@@ -599,12 +600,12 @@ void Gui::drawInput() {
cursorTimerHandler(this);
_cursorOff = false;
- font->drawString(&_screen, _lines[_inputTextLineNum], x, y, _screen.w, kColorBlack);
+ 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());
}
- _cursorX = font->getStringWidth(_lines[_inputTextLineNum]) + kConHPadding;
+ _cursorX = font->getStringWidth(_out[_inputTextLineNum]) + kConHPadding;
}
void Gui::loadFonts() {
diff --git a/engines/wage/wage.cpp b/engines/wage/wage.cpp
index 1c9a9828aa..12f4262965 100644
--- a/engines/wage/wage.cpp
+++ b/engines/wage/wage.cpp
@@ -172,7 +172,6 @@ void WageEngine::processEvents() {
processTurn(&_inputText, NULL);
_inputText = "";
- _gui->drawInput();
break;
default: