chip rack led setting

This commit is contained in:
Eknous-P 2025-09-17 15:25:26 +04:00
parent 24fabdf8c4
commit c0da289d40
3 changed files with 21 additions and 2 deletions

View file

@ -2056,6 +2056,7 @@ class FurnaceGUI {
int vibrationLength; int vibrationLength;
int s3mOPL3; int s3mOPL3;
int songNotesWrap; int songNotesWrap;
int rackShowLEDs;
String mainFontPath; String mainFontPath;
String headFontPath; String headFontPath;
String patFontPath; String patFontPath;
@ -2308,6 +2309,7 @@ class FurnaceGUI {
vibrationLength(20), vibrationLength(20),
s3mOPL3(1), s3mOPL3(1),
songNotesWrap(0), songNotesWrap(0),
rackShowLEDs(1),
mainFontPath(""), mainFontPath(""),
headFontPath(""), headFontPath(""),
patFontPath(""), patFontPath(""),

View file

@ -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.")); 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 // SUBSECTION WINDOWS
CONFIG_SUBSECTION(_("Windows")); CONFIG_SUBSECTION(_("Windows"));
bool roundedWindowsB=settings.roundedWindows; bool roundedWindowsB=settings.roundedWindows;
@ -5030,6 +5038,8 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
settings.songNotesWrap=conf.getInt("songNotesWrap", 0); settings.songNotesWrap=conf.getInt("songNotesWrap", 0);
settings.rackShowLEDs=conf.getInt("rackShowLEDs", 1);
settings.channelColors=conf.getInt("channelColors",1); settings.channelColors=conf.getInt("channelColors",1);
settings.channelTextColors=conf.getInt("channelTextColors",0); settings.channelTextColors=conf.getInt("channelTextColors",0);
settings.channelStyle=conf.getInt("channelStyle",1); settings.channelStyle=conf.getInt("channelStyle",1);
@ -5367,6 +5377,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
clampSetting(settings.shaderOsc,0,1); clampSetting(settings.shaderOsc,0,1);
clampSetting(settings.oscLineSize,0.25f,16.0f); clampSetting(settings.oscLineSize,0.25f,16.0f);
clampSetting(settings.songNotesWrap, 0, 1); clampSetting(settings.songNotesWrap, 0, 1);
clampSetting(settings.rackShowLEDs, 0, 1);
clampSetting(settings.cursorWheelStep,0,2); clampSetting(settings.cursorWheelStep,0,2);
clampSetting(settings.vsync,0,4); clampSetting(settings.vsync,0,4);
clampSetting(settings.frameRateLimit,0,1000); clampSetting(settings.frameRateLimit,0,1000);
@ -5612,6 +5623,8 @@ void FurnaceGUI::writeConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
conf.set("songNotesWrap",settings.songNotesWrap); conf.set("songNotesWrap",settings.songNotesWrap);
conf.set("rackShowLEDs", settings.rackShowLEDs);
conf.set("channelColors",settings.channelColors); conf.set("channelColors",settings.channelColors);
conf.set("channelTextColors",settings.channelTextColors); conf.set("channelTextColors",settings.channelTextColors);
conf.set("channelStyle",settings.channelStyle); conf.set("channelStyle",settings.channelStyle);

View file

@ -81,7 +81,8 @@ void FurnaceGUI::drawSysManager() {
} }
ImGui::SameLine(); ImGui::SameLine();
float buttonInnerSize=ImGui::CalcTextSize(ICON_FA_CLONE).x; 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::AlignTextToFramePadding();
ImGui::ScrollText(ImGui::GetID(rackNameID.c_str()),sysDef->name,ImVec2(0.0f,0.0f),ImVec2(ImGui::GetContentRegionAvail().x-sideButtonSize,0),false); 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)); ImGui::Dummy(ImVec2(ImGui::GetContentRegionAvail().x-sideButtonSize,1.0f));
@ -141,7 +142,10 @@ void FurnaceGUI::drawSysManager() {
ImGui::EndDisabled(); ImGui::EndDisabled();
// channel LEDs and chip config button // 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"); ImGuiID openedID=ImGui::GetID("OpenSysConfig");
bool opened=openedConfig->GetBool(openedID,false); bool opened=openedConfig->GetBool(openedID,false);