76 "ColorHitPlayerMonster",
77 "ColorHitMonsterPlayer",
78 "ColorHitPlayerPlayer",
80 "ColorHitLocalPlayerMonster",
81 "ColorHitLocalPlayerCritical",
82 "ColorHitLocalPlayerMiss",
85 "ColorPortalHighlight",
86 "ColorCollisionHighlight",
87 "ColorCollisionAirHighlight",
88 "ColorCollisionWaterHighlight",
89 "ColorCollisionMonsterHighlight",
90 "ColorCollisionGroundtopHighlight",
91 "ColorWalkableTileHighlight",
95 "ColorAttackRangeBorder",
96 "ColorMonsterAttackRange",
97 "ColorSkillAttackRange",
101 "ColorHomePlaceBorder",
107 std::string res(
"Color" + typeName);
109 for (
size_t i = 0; i < typeName.length(); i++)
111 if (i == 0 || typeName[i] ==
'_')
116 res[pos] = typeName[i];
120 res[pos] =
CAST_S8(tolower(typeName[i]));
124 res.erase(pos, res.length() - pos);
158 _(
"Disregarded names"),
182 _(
"Other players names"),
269 _(
"Particle effects"),
275 _(
"Pickup notification"),
281 _(
"Exp notification"),
290 _(
"Player HP bar"), 50);
295 _(
"Player HP bar (second color)"),
307 _(
"Monster HP bar (second color)"),
313 _(
"Homunculus HP bar"),
319 _(
"Homunculus HP bar (second color)"),
325 _(
"Mercenary HP bar"),
331 _(
"Mercenary HP bar (second color)"),
338 _(
"Elemental HP bar"),
344 _(
"Elemental HP bar (second color)"),
353 _(
"Player hits monster"),
359 _(
"Monster hits player"),
365 _(
"Other player hits local player"),
377 _(
"Local player hits monster"),
383 _(
"Local player critical hit"),
389 _(
"Local player miss"),
403 _(
"Portal highlight"),
409 _(
"Default collision highlight"),
415 _(
"Air collision highlight"),
421 _(
"Water collision highlight"),
427 _(
"Monster collision highlight"),
433 _(
"Special ground collision highlight"),
439 _(
"Walkable highlight"),
445 _(
"Tiles border"), 64);
453 _(
"Local player attack range"),
459 _(
"Local player attack range border"),
465 _(
"Monster attack range"),
471 _(
"Skill attack range border"),
480 _(
"Floor item amount color"),
492 _(
"Home place border"),
498 _(
"Road point"), 100);
517 snprintf(buffer,
sizeof(buffer),
"0x%06x", col->getRGB());
543 for (
size_t i = 0; i < sz; i++)
558 if (elem->
grad != grad)
574 i->committedGrad = i->grad;
575 i->committedDelay = i->delay;
577 i->committedColor = i->color;
579 i->committedColor = i->testColor;
587 if (i->grad != i->committedGrad)
590 const Color &committedColor = i->committedColor;
600 Color &testColor = i->testColor;
601 testColor.
r = committedColor.
r;
602 testColor.
g = committedColor.
g;
603 testColor.
b = committedColor.
b;
619 const std::string &text,
630 snprintf(buffer,
sizeof(buffer),
"0x%06x", rgb);
634 configName, std::string(buffer));
635 unsigned int rgbValue = 0;
636 if (rgbString.length() == 8 && rgbString[0] ==
'0' && rgbString[1] ==
'x')
637 rgbValue =
atox(rgbString);
639 rgbValue = atoi(rgbString.c_str());
642 configName +
"Gradient",
646 trueCol, grad, delay);
654 const std::string &text)
664 const std::string str(
" \342\200\225\342\200\225\342\200\225"
665 "\342\200\225\342\200\225 ");
668 std::string(str).append(text).append(str);
673 const CharColors::const_iterator it =
mCharColors.find(c);
int getValueInt(const std::string &key, const int deflt) const
std::string getValue(const std::string &key, const std::string &deflt) const
void setValue(const std::string &key, const std::string &value)
std::vector< ColorElem * > mGradVector
void addLabel(const UserColorIdT type, const std::string &text)
std::string getElementAt(int i)
static std::string getConfigName(const std::string &typeName)
void setColor(const UserColorIdT type, const int r, const int g, const int b)
void setGradientDelay(const UserColorIdT type, const int delay)
void setGradient(const UserColorIdT type, const GradientTypeT grad)
int getIdByChar(const signed char c, bool &valid) const
int getColorTypeAt(const int i)
void addColor(const UserColorIdT type, const unsigned rgb, GradientTypeT grad, const std::string &text, int delay)
int getNumberOfElements()
#define FOR_EACH(type, iter, array)
GradientType ::T GradientTypeT
@ AIR_COLLISION_HIGHLIGHT
@ MONSTER_COLLISION_HIGHLIGHT
@ GROUNDTOP_COLLISION_HIGHLIGHT
@ HIT_LOCAL_PLAYER_MONSTER
@ HIT_LOCAL_PLAYER_CRITICAL
@ WATER_COLLISION_HIGHLIGHT
unsigned int atox(const std::string &str)
std::string strprintf(const char *const format,...)
UserColorId ::T UserColorIdT
const std::string ColorTypeNames[static_cast< size_t >(UserColorId::USER_COLOR_LAST)]
UserPalette * userPalette