summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-18 15:37:29 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-18 15:37:29 +0300
commitf9f506fcf38e87f34d8a48af859889279d391713 (patch)
treeecd96455a754881358183bc75f9cea6f1dd75e25
parent5ec1b3eaa504bc8f9443a340e579e000d4516651 (diff)
downloadmanaplus-f9f506fcf38e87f34d8a48af859889279d391713.tar.gz
manaplus-f9f506fcf38e87f34d8a48af859889279d391713.tar.bz2
manaplus-f9f506fcf38e87f34d8a48af859889279d391713.tar.xz
manaplus-f9f506fcf38e87f34d8a48af859889279d391713.zip
Add own configurable color for skill attack range.
-rw-r--r--src/enums/gui/usercolorid.h1
-rw-r--r--src/gui/userpalette.cpp7
-rw-r--r--src/gui/widgets/tabs/setup_colors.cpp2
3 files changed, 10 insertions, 0 deletions
diff --git a/src/enums/gui/usercolorid.h b/src/enums/gui/usercolorid.h
index 19bbd6b3d..02a7a53ac 100644
--- a/src/enums/gui/usercolorid.h
+++ b/src/enums/gui/usercolorid.h
@@ -80,6 +80,7 @@ enumStart(UserColorId)
ATTACK_RANGE,
ATTACK_RANGE_BORDER,
MONSTER_ATTACK_RANGE,
+ SKILL_ATTACK_RANGE,
LABEL_OTHER,
FLOOR_ITEM_TEXT,
HOME_PLACE,
diff --git a/src/gui/userpalette.cpp b/src/gui/userpalette.cpp
index a7fba6399..d52463425 100644
--- a/src/gui/userpalette.cpp
+++ b/src/gui/userpalette.cpp
@@ -85,6 +85,7 @@ const std::string ColorTypeNames[CAST_SIZE(
"ColorAttackRange",
"ColorAttackRangeBorder",
"ColorMonsterAttackRange",
+ "ColorSkillAttackRange",
"",
"ColorFloorItemText",
"ColorHomePlace",
@@ -378,6 +379,12 @@ UserPalette::UserPalette() :
// TRANSLATORS: palette color
_("Monster attack range"),
20);
+ addColor(UserColorId::SKILL_ATTACK_RANGE,
+ 0x0,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Skill attack range border"),
+ 76);
addLabel(UserColorId::LABEL_OTHER,
// TRANSLATORS: palette label
_("Other"));
diff --git a/src/gui/widgets/tabs/setup_colors.cpp b/src/gui/widgets/tabs/setup_colors.cpp
index d4440d0f1..12b3f0ba3 100644
--- a/src/gui/widgets/tabs/setup_colors.cpp
+++ b/src/gui/widgets/tabs/setup_colors.cpp
@@ -326,6 +326,7 @@ void Setup_Colors::valueChanged(const SelectionEvent &event A_UNUSED)
case UserColorId::ATTACK_RANGE:
case UserColorId::MONSTER_ATTACK_RANGE:
case UserColorId::FLOOR_ITEM_TEXT:
+ case UserColorId::SKILL_ATTACK_RANGE:
mTextPreview->setShadow(false);
break;
default:
@@ -338,6 +339,7 @@ void Setup_Colors::valueChanged(const SelectionEvent &event A_UNUSED)
case UserColorId::ATTACK_RANGE:
case UserColorId::ATTACK_RANGE_BORDER:
case UserColorId::MONSTER_ATTACK_RANGE:
+ case UserColorId::SKILL_ATTACK_RANGE:
case UserColorId::HOME_PLACE:
case UserColorId::HOME_PLACE_BORDER:
case UserColorId::AIR_COLLISION_HIGHLIGHT: