summaryrefslogtreecommitdiff
path: root/src/gui/viewport.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-25 01:58:52 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-25 01:58:52 +0300
commite3682e2cdcb59c36792f6f9c39569e0af01088f0 (patch)
treeb4d7a665652e4a8c00f28d557f96b120abc62002 /src/gui/viewport.cpp
parent1b3a9751ae558e45c614f04525d5ff65e3c0fc1e (diff)
downloadManaVerse-e3682e2cdcb59c36792f6f9c39569e0af01088f0.tar.gz
ManaVerse-e3682e2cdcb59c36792f6f9c39569e0af01088f0.tar.bz2
ManaVerse-e3682e2cdcb59c36792f6f9c39569e0af01088f0.tar.xz
ManaVerse-e3682e2cdcb59c36792f6f9c39569e0af01088f0.zip
Dont set global color variables before drawing text.
This allow not set actual OpenGL color on each call because it useless for drawing text.
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r--src/gui/viewport.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 5bee2f8ff..473f6614e 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -357,8 +357,11 @@ void Viewport::drawPath(Graphics *const graphics,
if (mMap)
{
const std::string str = toString(cnt);
- font->drawString(graphics, str, squareX + 4
- - font->getWidth(str) / 2, squareY + 12);
+ font->drawString(graphics,
+ color, color,
+ str,
+ squareX + 4 - font->getWidth(str) / 2,
+ squareY + 12);
}
cnt ++;
}