diff --git a/src/gui/gui.h b/src/gui/gui.h index cfafec045..1e9fca083 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -2056,6 +2056,7 @@ class FurnaceGUI { int vibrationLength; int s3mOPL3; int songNotesWrap; + int rackShowLEDs; String mainFontPath; String headFontPath; String patFontPath; @@ -2308,6 +2309,7 @@ class FurnaceGUI { vibrationLength(20), s3mOPL3(1), songNotesWrap(0), + rackShowLEDs(1), mainFontPath(""), headFontPath(""), patFontPath(""), diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index 443f8cfb8..ee1bd8577 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -3848,6 +3848,14 @@ void FurnaceGUI::drawSettings() { ImGui::SetTooltip(_("Sorry, but, can you leave me alone?\nThere's plenty of other settings here for you to mess with.")); } + // SUBSECTION SONG COMMENTS + CONFIG_SUBSECTION(_("Chip Manager")); + bool rackShowLEDsB=settings.rackShowLEDs; + if (ImGui::Checkbox(_("Show channel indicators"), &rackShowLEDsB)) { + settings.rackShowLEDs=rackShowLEDsB; + settingsChanged=true; + } + // SUBSECTION WINDOWS CONFIG_SUBSECTION(_("Windows")); bool roundedWindowsB=settings.roundedWindows; @@ -5030,6 +5038,8 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) { settings.songNotesWrap=conf.getInt("songNotesWrap", 0); + settings.rackShowLEDs=conf.getInt("rackShowLEDs", 1); + settings.channelColors=conf.getInt("channelColors",1); settings.channelTextColors=conf.getInt("channelTextColors",0); settings.channelStyle=conf.getInt("channelStyle",1); @@ -5367,6 +5377,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) { clampSetting(settings.shaderOsc,0,1); clampSetting(settings.oscLineSize,0.25f,16.0f); clampSetting(settings.songNotesWrap, 0, 1); + clampSetting(settings.rackShowLEDs, 0, 1); clampSetting(settings.cursorWheelStep,0,2); clampSetting(settings.vsync,0,4); clampSetting(settings.frameRateLimit,0,1000); @@ -5612,6 +5623,8 @@ void FurnaceGUI::writeConfig(DivConfig& conf, FurnaceGUISettingGroups groups) { conf.set("songNotesWrap",settings.songNotesWrap); + conf.set("rackShowLEDs", settings.rackShowLEDs); + conf.set("channelColors",settings.channelColors); conf.set("channelTextColors",settings.channelTextColors); conf.set("channelStyle",settings.channelStyle); diff --git a/src/gui/sysManager.cpp b/src/gui/sysManager.cpp index 77334ff4a..9f9de0318 100644 --- a/src/gui/sysManager.cpp +++ b/src/gui/sysManager.cpp @@ -81,7 +81,8 @@ void FurnaceGUI::drawSysManager() { } ImGui::SameLine(); float buttonInnerSize=ImGui::CalcTextSize(ICON_FA_CLONE).x; - float sideButtonSize=ImGui::GetStyle().ItemSpacing.x*3.0f+buttonInnerSize*3.0f+ImGui::GetStyle().FramePadding.x*6; + float buttonCount=settings.rackShowLEDs?3.0f:4.0f; + float sideButtonSize=ImGui::GetStyle().ItemSpacing.x*buttonCount+buttonInnerSize*buttonCount+ImGui::GetStyle().FramePadding.x*2*buttonCount; ImGui::AlignTextToFramePadding(); ImGui::ScrollText(ImGui::GetID(rackNameID.c_str()),sysDef->name,ImVec2(0.0f,0.0f),ImVec2(ImGui::GetContentRegionAvail().x-sideButtonSize,0),false); ImGui::Dummy(ImVec2(ImGui::GetContentRegionAvail().x-sideButtonSize,1.0f)); @@ -141,7 +142,10 @@ void FurnaceGUI::drawSysManager() { ImGui::EndDisabled(); // channel LEDs and chip config button - float height=drawSystemChannelInfo(sysDef,dispatchOff,ImGui::GetContentRegionAvail().x-(ImGui::CalcTextSize(ICON_FA_CHEVRON_DOWN).x+ImGui::GetStyle().ItemSpacing.x)); + float height=0; + if (settings.rackShowLEDs) { + height=drawSystemChannelInfo(sysDef,dispatchOff,ImGui::GetContentRegionAvail().x-(ImGui::CalcTextSize(ICON_FA_CHEVRON_DOWN).x+ImGui::GetStyle().ItemSpacing.x)); + } ImGuiID openedID=ImGui::GetID("OpenSysConfig"); bool opened=openedConfig->GetBool(openedID,false);