diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-03-31 14:18:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-03-31 14:18:08 +0300 |
commit | 8f52bfee633b4aa2f7e49c1e16428d8f1c03fcfc (patch) | |
tree | a085aa87be20d1355f1aceaead205d6005b513e0 /src/text.cpp | |
parent | b637ace3685fb35e7de7c4e7cdae0638c80cd45a (diff) | |
download | manaplus-8f52bfee633b4aa2f7e49c1e16428d8f1c03fcfc.tar.gz manaplus-8f52bfee633b4aa2f7e49c1e16428d8f1c03fcfc.tar.bz2 manaplus-8f52bfee633b4aa2f7e49c1e16428d8f1c03fcfc.tar.xz manaplus-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.cpp | 11 |
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) |