mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-25 13:03:50 +00:00
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:
parent
dec23423d8
commit
e3c999d844
5 changed files with 40 additions and 34 deletions
|
|
@ -15,6 +15,7 @@
|
|||
#include "rendering/wmo_renderer.hpp"
|
||||
#include "rendering/m2_renderer.hpp"
|
||||
#include "rendering/camera.hpp"
|
||||
#include "ui/ui_colors.hpp"
|
||||
#include <imgui.h>
|
||||
#include <algorithm>
|
||||
#include <sstream>
|
||||
|
|
@ -24,9 +25,10 @@ namespace wowee {
|
|||
namespace rendering {
|
||||
|
||||
namespace {
|
||||
constexpr ImVec4 kHelpText = {0.6f, 0.6f, 0.6f, 1.0f};
|
||||
using namespace wowee::ui;
|
||||
constexpr ImVec4 kSectionHeader = {0.8f, 0.8f, 0.5f, 1.0f};
|
||||
constexpr ImVec4 kTitle = {0.7f, 0.7f, 0.7f, 1.0f};
|
||||
const auto& kHelpText = colors::kGray;
|
||||
const auto& kTitle = colors::kLightGray;
|
||||
} // namespace
|
||||
|
||||
PerformanceHUD::PerformanceHUD() {
|
||||
|
|
@ -197,7 +199,7 @@ void PerformanceHUD::render(const Renderer* renderer, const Camera* camera) {
|
|||
|
||||
// FSR info
|
||||
if (renderer->isFSREnabled()) {
|
||||
ImGui::TextColored(ImVec4(0.4f, 1.0f, 0.4f, 1.0f), "FSR 1.0: ON");
|
||||
ImGui::TextColored(colors::kGreen, "FSR 1.0: ON");
|
||||
auto* ctx = renderer->getVkContext();
|
||||
if (ctx) {
|
||||
auto ext = ctx->getSwapchainExtent();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue