mirror of
https://github.com/tildearrow/furnace.git
synced 2025-01-03 06:01:29 +00:00
GUI: add colors base setting
pave the way for.light themes
This commit is contained in:
parent
64146bed5e
commit
e0cda2a77f
3 changed files with 16 additions and 1 deletions
|
@ -5440,7 +5440,11 @@ void FurnaceGUI::parseKeybinds() {
|
|||
|
||||
void FurnaceGUI::applyUISettings() {
|
||||
ImGuiStyle sty;
|
||||
ImGui::StyleColorsDark(&sty);
|
||||
if (settings.guiColorsBase) {
|
||||
ImGui::StyleColorsLight(&sty);
|
||||
} else {
|
||||
ImGui::StyleColorsDark(&sty);
|
||||
}
|
||||
|
||||
if (settings.dpiScale>=0.5f) dpiScale=settings.dpiScale;
|
||||
|
||||
|
|
|
@ -493,6 +493,7 @@ class FurnaceGUI {
|
|||
int statusDisplay;
|
||||
float dpiScale;
|
||||
int viewPrevPattern;
|
||||
int guiColorsBase;
|
||||
unsigned int maxUndoSteps;
|
||||
String mainFontPath;
|
||||
String patFontPath;
|
||||
|
@ -533,6 +534,7 @@ class FurnaceGUI {
|
|||
statusDisplay(0),
|
||||
dpiScale(0.0f),
|
||||
viewPrevPattern(1),
|
||||
guiColorsBase(0),
|
||||
maxUndoSteps(100),
|
||||
mainFontPath(""),
|
||||
patFontPath(""),
|
||||
|
|
|
@ -425,6 +425,13 @@ void FurnaceGUI::drawSettings() {
|
|||
|
||||
if (ImGui::TreeNode("Color scheme")) {
|
||||
if (ImGui::TreeNode("General")) {
|
||||
ImGui::Text("Color scheme type:");
|
||||
if (ImGui::RadioButton("Dark##gcb0",settings.guiColorsBase==0)) {
|
||||
settings.guiColorsBase=0;
|
||||
}
|
||||
if (ImGui::RadioButton("Light##gcb1",settings.guiColorsBase==1)) {
|
||||
settings.guiColorsBase=1;
|
||||
}
|
||||
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");
|
||||
|
@ -856,6 +863,7 @@ void FurnaceGUI::syncSettings() {
|
|||
settings.statusDisplay=e->getConfInt("statusDisplay",0);
|
||||
settings.dpiScale=e->getConfFloat("dpiScale",0.0f);
|
||||
settings.viewPrevPattern=e->getConfInt("viewPrevPattern",1);
|
||||
settings.guiColorsBase=e->getConfInt("guiColorsBase",0);
|
||||
|
||||
// keybinds
|
||||
LOAD_KEYBIND(GUI_ACTION_OPEN,FURKMOD_CMD|SDLK_o);
|
||||
|
@ -1051,6 +1059,7 @@ void FurnaceGUI::commitSettings() {
|
|||
e->setConf("statusDisplay",settings.statusDisplay);
|
||||
e->setConf("dpiScale",settings.dpiScale);
|
||||
e->setConf("viewPrevPattern",settings.viewPrevPattern);
|
||||
e->setConf("guiColorsBase",settings.guiColorsBase);
|
||||
|
||||
PUT_UI_COLOR(GUI_COLOR_BACKGROUND);
|
||||
PUT_UI_COLOR(GUI_COLOR_FRAME_BACKGROUND);
|
||||
|
|
Loading…
Reference in a new issue