summaryrefslogtreecommitdiff
path: root/src/text.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-31 14:18:08 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-31 14:18:08 +0300
commit8f52bfee633b4aa2f7e49c1e16428d8f1c03fcfc (patch)
treea085aa87be20d1355f1aceaead205d6005b513e0 /src/text.cpp
parentb637ace3685fb35e7de7c4e7cdae0638c80cd45a (diff)
downloadplus-8f52bfee633b4aa2f7e49c1e16428d8f1c03fcfc.tar.gz
plus-8f52bfee633b4aa2f7e49c1e16428d8f1c03fcfc.tar.bz2
plus-8f52bfee633b4aa2f7e49c1e16428d8f1c03fcfc.tar.xz
plus-8f52bfee633b4aa2f7e49c1e16428d8f1c03fcfc.zip
Add option to move player names (disabled by default).
In old implimentation names was always moved.
Diffstat (limited to 'src/text.cpp')
-rw-r--r--src/text.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/text.cpp b/src/text.cpp
index 76271aecb..07041afd9 100644
--- a/src/text.cpp
+++ b/src/text.cpp
@@ -118,10 +118,17 @@ void Text::setColor(const gcn::Color *const color)
mColor = color;
}
-void Text::adviseXY(const int x, const int y)
+void Text::adviseXY(const int x, const int y, const bool move)
{
- if (textManager)
+ if (textManager && move)
+ {
textManager->moveText(this, x - mXOffset, y);
+ }
+ else
+ {
+ mX = x - mXOffset;
+ mY = y;
+ }
}
void Text::draw(Graphics *const graphics, const int xOff, const int yOff)