aboutsummaryrefslogtreecommitdiff
path: root/engines/wage
diff options
context:
space:
mode:
authorEugene Sandulenko2016-01-04 11:11:27 +0100
committerEugene Sandulenko2016-01-04 11:11:27 +0100
commit5cffbed146eaf21be4cb1bb1bf3939e2da7e2c1c (patch)
tree43c55d6b85d2919867b016cb169c06406bfe3139 /engines/wage
parent21dae458ea4f9629da371fd554e4018c58e73ddb (diff)
downloadscummvm-rg350-5cffbed146eaf21be4cb1bb1bf3939e2da7e2c1c.tar.gz
scummvm-rg350-5cffbed146eaf21be4cb1bb1bf3939e2da7e2c1c.tar.bz2
scummvm-rg350-5cffbed146eaf21be4cb1bb1bf3939e2da7e2c1c.zip
WAGE: Fix cursor position for built-in fonts
Diffstat (limited to 'engines/wage')
-rw-r--r--engines/wage/gui.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp
index 6ecc4c8a57..837632a520 100644
--- a/engines/wage/gui.cpp
+++ b/engines/wage/gui.cpp
@@ -433,9 +433,9 @@ void Gui::flowText(String &str) {
_cursorX = kConHPadding;
if (_scrollPos)
- _cursorY = (_consoleNumLines + 1) * _consoleLineHeight;
+ _cursorY = (_consoleNumLines + 1) * _consoleLineHeight + kConHPadding;
else
- _cursorY = (_lines.size()) * _consoleLineHeight;
+ _cursorY = (_lines.size()) * _consoleLineHeight + kConHPadding;
if (pos != _scrollPos)
_consoleFullRedraw = true;
@@ -488,7 +488,7 @@ void Gui::renderConsole(Graphics::Surface *g, Common::Rect &r) {
int y1 = yOff - (_scrollPos % _consoleLineHeight) + kConHPadding;
if (fullRedraw)
- _consoleNumLines = r.height() / _consoleLineHeight - 2;
+ _consoleNumLines = (r.height() - 2 * kConWPadding) / _consoleLineHeight - 2;
for (int line = firstLine; line < lastLine; line++) {
const char *str = _lines[line].c_str();
@@ -509,7 +509,7 @@ void Gui::drawInput() {
const Graphics::Font *font = getConsoleFont();
- int x = kConHPadding + _consoleTextArea.left;
+ int x = kConWPadding + _consoleTextArea.left;
int y = _cursorY + _consoleTextArea.top;
Common::String text(_engine->_inputText);
int textW = font->getStringWidth(text);