From cbdb835dd133f26157c43d064499c289d63c2a7c Mon Sep 17 00:00:00 2001 From: HumanoidSandvichDispenser Date: Sun, 8 Feb 2026 19:33:43 -0800 Subject: [PATCH] Add dark background toggle --- as1/as1.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/as1/as1.cpp b/as1/as1.cpp index 064a643..361bad4 100644 --- a/as1/as1.cpp +++ b/as1/as1.cpp @@ -1,10 +1,12 @@ #include "AudioDevice.hpp" #include "Color.hpp" +#include "raylib.h" #include #include #include static std::function pingButtonHandler; +static bool darkMode = false; void PingButton() { pingButtonHandler(); @@ -43,7 +45,16 @@ int main() { GuiVolumeControl(&guiState); - window.ClearBackground(raylib::Color::RayWhite()); + const char *modeText = darkMode ? "Background: Black" : "Background: White"; + if (GuiButton((Rectangle){ 24, 328, 256, 24 }, modeText)) { + darkMode = !darkMode; + } + + if (darkMode) { + window.ClearBackground(raylib::Color::Black()); + } else { + window.ClearBackground(raylib::Color::RayWhite()); + } ping.SetVolume(guiState.SFXSliderValue / 100.0f);