summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-11-30 17:00:05 +0300
committerAndrei Karas <akaras@inbox.ru>2013-11-30 17:00:05 +0300
commitba5fcf25f014adad9a4511797a6c4d13b12e1751 (patch)
treeaebce3da21592970697a3eef1c82de3e10fd6026
parent52282e39f324a852a94c538c33c5197bcc472d31 (diff)
downloadmanaplus-ba5fcf25f014adad9a4511797a6c4d13b12e1751.tar.gz
manaplus-ba5fcf25f014adad9a4511797a6c4d13b12e1751.tar.bz2
manaplus-ba5fcf25f014adad9a4511797a6c4d13b12e1751.tar.xz
manaplus-ba5fcf25f014adad9a4511797a6c4d13b12e1751.zip
add customizable color for tiles separation border.
-rw-r--r--src/gui/userpalette.cpp6
-rw-r--r--src/gui/userpalette.h1
-rw-r--r--src/gui/widgets/tabs/setup_colors.cpp2
-rw-r--r--src/map.cpp2
4 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/userpalette.cpp b/src/gui/userpalette.cpp
index 75b0f5898..ff4789e9a 100644
--- a/src/gui/userpalette.cpp
+++ b/src/gui/userpalette.cpp
@@ -70,7 +70,8 @@ const std::string ColorTypeNames[] =
"ColorFloorItemText",
"ColorHomePlace",
"ColorHomePlaceBorder",
- "ColorRoadPoint"
+ "ColorRoadPoint",
+ "ColorNet"
};
std::string UserPalette::getConfigName(const std::string &typeName)
@@ -208,6 +209,9 @@ UserPalette::UserPalette():
addColor(ROAD_POINT, 0x000000, STATIC,
// TRANSLATORS: palette color
_("Road point"), 100);
+ addColor(NET, 0x000000, STATIC,
+ // TRANSLATORS: palette color
+ _("Tiles border"), 64);
commit(true);
}
diff --git a/src/gui/userpalette.h b/src/gui/userpalette.h
index 32cc9d963..8fd251747 100644
--- a/src/gui/userpalette.h
+++ b/src/gui/userpalette.h
@@ -77,6 +77,7 @@ class UserPalette final : public Palette, public gcn::ListModel
HOME_PLACE,
HOME_PLACE_BORDER,
ROAD_POINT,
+ NET,
USER_COLOR_LAST
};
diff --git a/src/gui/widgets/tabs/setup_colors.cpp b/src/gui/widgets/tabs/setup_colors.cpp
index db4b2faae..9b7036222 100644
--- a/src/gui/widgets/tabs/setup_colors.cpp
+++ b/src/gui/widgets/tabs/setup_colors.cpp
@@ -274,6 +274,7 @@ void Setup_Colors::valueChanged(const gcn::SelectionEvent &event A_UNUSED)
case UserPalette::PORTAL_HIGHLIGHT:
case UserPalette::HOME_PLACE:
case UserPalette::ROAD_POINT:
+ case UserPalette::NET:
mTextPreview->setBGColor(col);
mTextPreview->setOpaque(true);
mTextPreview->setOutline(false);
@@ -325,6 +326,7 @@ void Setup_Colors::valueChanged(const gcn::SelectionEvent &event A_UNUSED)
case UserPalette::PLAYER_HP:
case UserPalette::PLAYER_HP2:
case UserPalette::FLOOR_ITEM_TEXT:
+ case UserPalette::NET:
// TRANSLATORS: colors tab. label.
mGradDelayLabel->setCaption(_("Alpha:"));
mGradDelayText->setRange(0, 255);
diff --git a/src/map.cpp b/src/map.cpp
index dac9fc71f..9d5eafc7b 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -568,7 +568,7 @@ void Map::drawCollision(Graphics *const graphics,
if (debugFlags < MAP_SPECIAL)
{
- graphics->setColor(gcn::Color(0, 0, 0, 64));
+ graphics->setColor(userPalette->getColorWithAlpha(UserPalette::NET));
graphics->drawNet(
startX * mTileWidth - scrollX,
startY * mTileHeight - scrollY,