refactor: add 6 color constants, replace 61 inline literals, remove const_cast
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run

- Add kBrightGold, kPaleRed, kBrightRed, kLightBlue, kManaBlue, kCyan to ui_colors.hpp
- Replace 61 inline ImVec4 color literals across game_screen, inventory_screen,
  talent_screen, and world_map with named constants
- Remove const_cast in character_renderer render loop by using non-const iteration
This commit is contained in:
Kelsi 2026-03-27 10:08:30 -07:00
parent be694be558
commit 4090041431
6 changed files with 87 additions and 84 deletions

View file

@ -16,6 +16,12 @@ namespace colors {
constexpr ImVec4 kLightGray = {0.7f, 0.7f, 0.7f, 1.0f};
constexpr ImVec4 kWhite = {1.0f, 1.0f, 1.0f, 1.0f};
constexpr ImVec4 kTooltipGold = {1.0f, 0.82f, 0.0f, 1.0f};
constexpr ImVec4 kBrightGold = {1.0f, 0.85f, 0.0f, 1.0f};
constexpr ImVec4 kPaleRed = {1.0f, 0.5f, 0.5f, 1.0f};
constexpr ImVec4 kBrightRed = {1.0f, 0.2f, 0.2f, 1.0f};
constexpr ImVec4 kLightBlue = {0.4f, 0.6f, 1.0f, 1.0f};
constexpr ImVec4 kManaBlue = {0.2f, 0.2f, 0.9f, 1.0f};
constexpr ImVec4 kCyan = {0.0f, 0.8f, 1.0f, 1.0f};
// Coin colors
constexpr ImVec4 kGold = {1.00f, 0.82f, 0.00f, 1.0f};