refactor: add 9 button/bar color constants, batch constexpr promotions

New ui_colors.hpp constants: kBtnGreen, kBtnGreenHover, kBtnRed,
kBtnRedHover, kBtnDkGreen/Hover, kBtnDkRed/Hover, kMidHealthYellow
— replacing 21 inline literals across accept/decline button and
health bar patterns.

Deduplicate kMon/kMonths month arrays (2 copies → 1 kMonthAbbrev).

Promote 22 remaining static const char*/int arrays to constexpr
(kQualHex, resLabels, kRepRankNames, kTotemNames, kReactLabels,
kChatHelp, kMacroHelp, kHelpLines, kMarkWords, componentDirs,
keyLabels, kRollLabels, gossipIcons, kMarkNames, kDiffLabels,
kStatLabels, kCatHeaders, kSlotNames, kResolutions, displayToInternal).
This commit is contained in:
Kelsi 2026-03-27 14:44:52 -07:00
parent 4981d162c5
commit e474dca2be
2 changed files with 63 additions and 54 deletions

View file

@ -42,6 +42,17 @@ namespace colors {
constexpr ImVec4 kLowHealthRed = {0.8f, 0.2f, 0.2f, 1.0f};
constexpr ImVec4 kDangerRed = {0.7f, 0.2f, 0.2f, 1.0f};
// Button styling colors (accept/decline patterns)
constexpr ImVec4 kBtnGreen = {0.15f, 0.5f, 0.15f, 1.0f};
constexpr ImVec4 kBtnGreenHover = {0.2f, 0.7f, 0.2f, 1.0f}; // == kFriendlyGreen
constexpr ImVec4 kBtnRed = {0.5f, 0.15f, 0.15f, 1.0f};
constexpr ImVec4 kBtnRedHover = {0.7f, 0.3f, 0.3f, 1.0f};
constexpr ImVec4 kBtnDkGreen = {0.2f, 0.5f, 0.2f, 1.0f};
constexpr ImVec4 kBtnDkGreenHover= {0.3f, 0.7f, 0.3f, 1.0f};
constexpr ImVec4 kBtnDkRed = {0.5f, 0.2f, 0.2f, 1.0f};
constexpr ImVec4 kBtnDkRedHover = {0.7f, 0.3f, 0.3f, 1.0f};
constexpr ImVec4 kMidHealthYellow= {0.8f, 0.8f, 0.2f, 1.0f};
// Power-type colors (unit resource bars)
constexpr ImVec4 kEnergyYellow = {0.9f, 0.9f, 0.2f, 1.0f};
constexpr ImVec4 kHappinessGreen = {0.5f, 0.9f, 0.3f, 1.0f};