aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-02-04 11:37:47 +0100
committerEugene Sandulenko2016-02-14 17:13:00 +0100
commitb24be406d27373b5ea1a041eceba4dfea42cbb82 (patch)
treefc5df17368346f36043744be433245963c647d1e
parentd585719c2d4034b17d9a49584e45775c1f357727 (diff)
downloadscummvm-rg350-b24be406d27373b5ea1a041eceba4dfea42cbb82.tar.gz
scummvm-rg350-b24be406d27373b5ea1a041eceba4dfea42cbb82.tar.bz2
scummvm-rg350-b24be406d27373b5ea1a041eceba4dfea42cbb82.zip
WAGE: Fixes to selection highlighting
-rw-r--r--engines/wage/gui.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp
index 0bf1c345a6..4f1bc98269 100644
--- a/engines/wage/gui.cpp
+++ b/engines/wage/gui.cpp
@@ -508,8 +508,8 @@ void Gui::renderConsole(Graphics::Surface *g, Common::Rect &r) {
if (line == _selectionStartY || line == _selectionEndY) {
if (_selectionStartY != _selectionEndY) {
- int color1 = kColorWhite;
- int color2 = kColorBlack;
+ int color1 = kColorBlack;
+ int color2 = kColorWhite;
int midpoint = _selectionStartX;
if (_selectionStartY > _selectionEndY)
@@ -523,8 +523,6 @@ void Gui::renderConsole(Graphics::Surface *g, Common::Rect &r) {
Common::String beg(_lines[line].c_str(), &_lines[line].c_str()[midpoint]);
Common::String end(&_lines[line].c_str()[midpoint]);
- warning("beg: %s end: %s", beg.c_str(), end.c_str());
-
int rectW = font->getStringWidth(beg) + kConWPadding + kConWOverlap;
Common::Rect trect(0, y1, _console.w, y1 + _consoleLineHeight);
if (color1 == kColorWhite)
@@ -535,7 +533,7 @@ void Gui::renderConsole(Graphics::Surface *g, Common::Rect &r) {
Design::drawFilledRect(&_console, trect, kColorBlack, _patterns, kPatternSolid);
font->drawString(&_console, beg, x1, y1, textW, color1);
- font->drawString(&_console, end, x1 + rectW, y1, textW, color2);
+ font->drawString(&_console, end, x1 + rectW - kConWPadding - kConWOverlap, y1, textW, color2);
}
} else {
if (*str)