refactor: add 4 color constants, replace 31 more inline literals

Add kDarkRed, kSoftRed, kHostileRed, kMediumGray to ui_colors.hpp and
replace 31 inline ImVec4 literals across game_screen, character_screen,
inventory_screen, and performance_hud. Also replace local color aliases
in performance_hud with shared constants.
This commit is contained in:
Kelsi 2026-03-27 10:20:45 -07:00
parent dec23423d8
commit e3c999d844
5 changed files with 40 additions and 34 deletions

View file

@ -94,7 +94,7 @@ void CharacterScreen::render(game::GameHandler& gameHandler) {
if (characters.empty() &&
(gameHandler.getState() == game::WorldState::DISCONNECTED ||
gameHandler.getState() == game::WorldState::FAILED)) {
ImGui::TextColored(ImVec4(1.0f, 0.4f, 0.4f, 1.0f), "Disconnected from server.");
ImGui::TextColored(ui::colors::kSoftRed, "Disconnected from server.");
ImGui::TextWrapped("The server closed the connection before sending the character list.");
ImGui::Spacing();
if (ImGui::Button("Back", ImVec2(120, 36))) { if (onBack) onBack(); }