From e3682e2cdcb59c36792f6f9c39569e0af01088f0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 25 May 2015 01:58:52 +0300 Subject: Dont set global color variables before drawing text. This allow not set actual OpenGL color on each call because it useless for drawing text. --- src/resources/map/mapitem.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/resources/map/mapitem.cpp') diff --git a/src/resources/map/mapitem.cpp b/src/resources/map/mapitem.cpp index 146003040..3037dfb4a 100644 --- a/src/resources/map/mapitem.cpp +++ b/src/resources/map/mapitem.cpp @@ -165,8 +165,12 @@ void MapItem::draw(Graphics *const graphics, const int x, const int y, Font *const font = gui->getFont(); if (font) { - graphics->setColor(userPalette->getColor(UserPalette::BEING)); - font->drawString(graphics, mName, x, y); + const Color &color = userPalette->getColor(UserPalette::BEING); + font->drawString(graphics, + color, + color, + mName, + x, y); } } BLOCK_END("MapItem::draw") -- cgit v1.2.3-60-g2f50