mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-15 00:43:52 +00:00
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
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:
parent
be694be558
commit
4090041431
6 changed files with 87 additions and 84 deletions
|
|
@ -10,6 +10,7 @@
|
|||
#include "core/coordinates.hpp"
|
||||
#include "core/input.hpp"
|
||||
#include "core/logger.hpp"
|
||||
#include "ui/ui_colors.hpp"
|
||||
#include <imgui.h>
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
|
|
@ -1295,7 +1296,7 @@ void WorldMap::renderImGuiOverlay(const glm::vec3& playerRenderPos, int screenWi
|
|||
ImGui::SetCursorPos(ImVec2(mapX + 8.0f, mapY + 8.0f));
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.15f, 0.15f, 0.15f, 0.8f));
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(0.3f, 0.3f, 0.1f, 0.9f));
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.85f, 0.0f, 1.0f));
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ui::colors::kBrightGold);
|
||||
if (ImGui::Button("< Back")) goBack = true;
|
||||
ImGui::PopStyleColor(3);
|
||||
|
||||
|
|
@ -1323,7 +1324,7 @@ void WorldMap::renderImGuiOverlay(const glm::vec3& playerRenderPos, int screenWi
|
|||
ImGui::SetCursorPos(ImVec2(mapX + 8.0f, worldBtnY));
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.15f, 0.15f, 0.15f, 0.8f));
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(0.3f, 0.3f, 0.1f, 0.9f));
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.85f, 0.0f, 1.0f));
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ui::colors::kBrightGold);
|
||||
if (ImGui::Button("< World")) goWorld = true;
|
||||
ImGui::PopStyleColor(3);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue