From 8f52bfee633b4aa2f7e49c1e16428d8f1c03fcfc Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 31 Mar 2013 14:18:08 +0300 Subject: Add option to move player names (disabled by default). In old implimentation names was always moved. --- src/text.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/text.cpp') 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) -- cgit v1.2.3-70-g09d2