Skip to content

Commit

Permalink
WAGE: Fix text coordinate calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Feb 14, 2016
1 parent 40cdf02 commit 5ac2581
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions engines/wage/gui.cpp
Expand Up @@ -713,7 +713,7 @@ int Gui::calcTextX(int x, int textLine) {
const Graphics::Font *font = getConsoleFont();
Common::String str = _lines[textLine];

x -= _consoleTextArea.left + kConWOverlap + kConWPadding;
x -= _consoleTextArea.left;

for (int i = str.size(); i >= 0; i--) {
if (font->getStringWidth(str) < x) {
Expand All @@ -727,7 +727,7 @@ int Gui::calcTextX(int x, int textLine) {
}

int Gui::calcTextY(int y) {
y -= _consoleTextArea.top + kConHOverlap + kConHPadding;
y -= _consoleTextArea.top;

if (y < 0)
y = 0;
Expand Down

0 comments on commit 5ac2581

Please sign in to comment.