From b7dfefb51cdac93dba23e27477c9439ad384ada9 Mon Sep 17 00:00:00 2001 From: soda3000 Date: Wed, 11 Jun 2025 20:42:20 -0300 Subject: [PATCH 1/2] Fixed includes and encapsulation to build --- src/Feature.h | 5 ++++- src/Menu.h | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Feature.h b/src/Feature.h index c5e7bb5be1..7796d79761 100644 --- a/src/Feature.h +++ b/src/Feature.h @@ -1,5 +1,8 @@ #pragma once +#include "Globals.h" +#include "Menu.h" + struct Feature { bool loaded = false; @@ -54,7 +57,7 @@ struct Feature auto [description, keyFeatures] = GetFeatureSummary(); if (!description.empty() || !keyFeatures.empty()) { - ImGui::TextColored(globals::menu->settings.Theme.StatusPalette.Error, "This feature is not installed!"); + ImGui::TextColored(Menu::GetSingleton()->GetTheme().StatusPalette.Error, "This feature is not installed!"); ImGui::Spacing(); if (!description.empty()) { diff --git a/src/Menu.h b/src/Menu.h index 458cba8b81..deb98b7939 100644 --- a/src/Menu.h +++ b/src/Menu.h @@ -2,6 +2,7 @@ #include "Utils/Serialize.h" #include +#include using namespace std::chrono; #define BUFFER_VIEWER_NODE(a_value, a_scale) \ @@ -178,6 +179,8 @@ class Menu } PerfOverlay; }; + const ThemeSettings& GetTheme() const { return settings.Theme; } // Provide read-only access to the Theme. + private: Settings settings; From e5673414cf80cb2898d24014c0c764f8d2b55ba2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 11 Jun 2025 23:47:08 +0000 Subject: [PATCH 2/2] =?UTF-8?q?style:=20=F0=9F=8E=A8=20apply=20pre-commit.?= =?UTF-8?q?ci=20formatting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated formatting by clang-format, prettier, and other hooks. See https://pre-commit.ci for details. --- src/Menu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Menu.h b/src/Menu.h index deb98b7939..570fc6c194 100644 --- a/src/Menu.h +++ b/src/Menu.h @@ -179,7 +179,7 @@ class Menu } PerfOverlay; }; - const ThemeSettings& GetTheme() const { return settings.Theme; } // Provide read-only access to the Theme. + const ThemeSettings& GetTheme() const { return settings.Theme; } // Provide read-only access to the Theme. private: Settings settings;