From f01ce71fb6b96e87ff753bd4e263dcb3c5c8f5e8 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sat, 29 Jan 2022 14:20:30 -0500 Subject: [PATCH] GUI: add an option to set modal backdrop color --- src/gui/gui.cpp | 4 ++++ src/gui/gui.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 31e4fa37..ecda5d07 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -2711,6 +2711,7 @@ void FurnaceGUI::drawSettings() { if (ImGui::TreeNode("General")) { UI_COLOR_CONFIG(GUI_COLOR_BACKGROUND,"Background"); UI_COLOR_CONFIG(GUI_COLOR_FRAME_BACKGROUND,"Window background"); + UI_COLOR_CONFIG(GUI_COLOR_MODAL_BACKDROP,"Modal backdrop"); UI_COLOR_CONFIG(GUI_COLOR_HEADER,"Header"); UI_COLOR_CONFIG(GUI_COLOR_TEXT,"Text"); UI_COLOR_CONFIG(GUI_COLOR_ACCENT_PRIMARY,"Primary"); @@ -2857,6 +2858,7 @@ void FurnaceGUI::commitSettings() { PUT_UI_COLOR(GUI_COLOR_BACKGROUND); PUT_UI_COLOR(GUI_COLOR_FRAME_BACKGROUND); + PUT_UI_COLOR(GUI_COLOR_MODAL_BACKDROP); PUT_UI_COLOR(GUI_COLOR_HEADER); PUT_UI_COLOR(GUI_COLOR_TEXT); PUT_UI_COLOR(GUI_COLOR_ACCENT_PRIMARY); @@ -5142,6 +5144,7 @@ void FurnaceGUI::applyUISettings() { GET_UI_COLOR(GUI_COLOR_BACKGROUND,ImVec4(0.1f,0.1f,0.1f,1.0f)); GET_UI_COLOR(GUI_COLOR_FRAME_BACKGROUND,ImVec4(0.0f,0.0f,0.0f,0.85f)); + GET_UI_COLOR(GUI_COLOR_MODAL_BACKDROP,ImVec4(0.0f,0.0f,0.0f,0.55f)); GET_UI_COLOR(GUI_COLOR_HEADER,ImVec4(0.2f,0.2f,0.2f,1.0f)); GET_UI_COLOR(GUI_COLOR_TEXT,ImVec4(1.0f,1.0f,1.0f,1.0f)); GET_UI_COLOR(GUI_COLOR_ACCENT_PRIMARY,ImVec4(0.06f,0.53f,0.98f,1.0f)); @@ -5234,6 +5237,7 @@ void FurnaceGUI::applyUISettings() { sty.Colors[ImGuiCol_WindowBg]=uiColors[GUI_COLOR_FRAME_BACKGROUND]; + sty.Colors[ImGuiCol_ModalWindowDimBg]=uiColors[GUI_COLOR_MODAL_BACKDROP]; sty.Colors[ImGuiCol_Text]=uiColors[GUI_COLOR_TEXT]; sty.Colors[ImGuiCol_Button]=primary; diff --git a/src/gui/gui.h b/src/gui/gui.h index 061ee0a1..59a4c2b1 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -10,6 +10,7 @@ enum FurnaceGUIColors { GUI_COLOR_BACKGROUND=0, GUI_COLOR_FRAME_BACKGROUND, + GUI_COLOR_MODAL_BACKDROP, GUI_COLOR_HEADER, GUI_COLOR_TEXT, GUI_COLOR_ACCENT_PRIMARY,