mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-06 13:13:51 +00:00
refactor: replace 60+ inline color literals with shared ui::colors constants
Use kRed, kBrightGreen, kDarkGray, kLightGray from ui_colors.hpp across 8 UI files, eliminating duplicate ImVec4 color definitions throughout the UI layer.
This commit is contained in:
parent
4d46641ac2
commit
b892dca0e5
8 changed files with 58 additions and 52 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#include "ui/auth_screen.hpp"
|
||||
#include "ui/ui_colors.hpp"
|
||||
#include "auth/crypto.hpp"
|
||||
#include "core/application.hpp"
|
||||
#include "core/logger.hpp"
|
||||
|
|
@ -393,9 +394,9 @@ void AuthScreen::render(auth::AuthHandler& authHandler) {
|
|||
// Connection status
|
||||
if (!statusMessage.empty()) {
|
||||
if (statusIsError) {
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.3f, 0.3f, 1.0f));
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ui::colors::kRed);
|
||||
} else {
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.3f, 1.0f, 0.3f, 1.0f));
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ui::colors::kBrightGreen);
|
||||
}
|
||||
ImGui::TextWrapped("%s", statusMessage.c_str());
|
||||
ImGui::PopStyleColor();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue