summaryrefslogtreecommitdiff
path: root/src/resources/map/mapitem.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-30 16:28:38 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-30 16:29:31 +0300
commit2b8e0b02338400b215b73cec900ffa1fddbac60a (patch)
tree0920d2980bf60aeeb5b9a44140f4537353ced0d9 /src/resources/map/mapitem.cpp
parentdc8422dbac2c45a082153240138d699c1bfc3b88 (diff)
downloadmanaverse-2b8e0b02338400b215b73cec900ffa1fddbac60a.tar.gz
manaverse-2b8e0b02338400b215b73cec900ffa1fddbac60a.tar.bz2
manaverse-2b8e0b02338400b215b73cec900ffa1fddbac60a.tar.xz
manaverse-2b8e0b02338400b215b73cec900ffa1fddbac60a.zip
Move user defined colors enum into separate file.
Diffstat (limited to 'src/resources/map/mapitem.cpp')
-rw-r--r--src/resources/map/mapitem.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/resources/map/mapitem.cpp b/src/resources/map/mapitem.cpp
index 3037dfb4a..29f2b8eff 100644
--- a/src/resources/map/mapitem.cpp
+++ b/src/resources/map/mapitem.cpp
@@ -20,6 +20,8 @@
#include "resources/map/mapitem.h"
+#include "enums/gui/usercolorid.h"
+
#include "gui/gui.h"
#include "gui/userpalette.h"
@@ -141,17 +143,17 @@ void MapItem::draw(Graphics *const graphics, const int x, const int y,
case MapItemType::ROAD:
case MapItemType::CROSS:
graphics->setColor(userPalette->getColorWithAlpha(
- UserPalette::ROAD_POINT));
+ UserColorId::ROAD_POINT));
graphics->fillRectangle(Rect(x + dx / 3, y + dy / 3,
dx / 3, dy / 3));
break;
case MapItemType::HOME:
{
graphics->setColor(userPalette->getColorWithAlpha(
- UserPalette::HOME_PLACE));
+ UserColorId::HOME_PLACE));
graphics->fillRectangle(Rect(x, y, dx, dy));
graphics->setColor(userPalette->getColorWithAlpha(
- UserPalette::HOME_PLACE_BORDER));
+ UserColorId::HOME_PLACE_BORDER));
graphics->drawRectangle(Rect(x, y, dx, dy));
break;
}
@@ -165,7 +167,7 @@ void MapItem::draw(Graphics *const graphics, const int x, const int y,
Font *const font = gui->getFont();
if (font)
{
- const Color &color = userPalette->getColor(UserPalette::BEING);
+ const Color &color = userPalette->getColor(UserColorId::BEING);
font->drawString(graphics,
color,
color,