setting and stuf

This commit is contained in:
Eknous-P 2024-03-22 20:46:58 +04:00
parent bab56fa138
commit ee3488a119
5 changed files with 28 additions and 11 deletions

View file

@ -1816,7 +1816,7 @@ class FurnaceGUI {
int shaderOsc; int shaderOsc;
int cursorWheelStep; int cursorWheelStep;
int chipManagerTooltip; int chipManagerTooltip;
int sysTooltipChannelColors; int sysTooltipChanInfoStyle;
unsigned int maxUndoSteps; unsigned int maxUndoSteps;
String mainFontPath; String mainFontPath;
String headFontPath; String headFontPath;
@ -2023,7 +2023,7 @@ class FurnaceGUI {
shaderOsc(1), shaderOsc(1),
cursorWheelStep(0), cursorWheelStep(0),
chipManagerTooltip(1), // poll? chipManagerTooltip(1), // poll?
sysTooltipChannelColors(1), // poll? sysTooltipChanInfoStyle(3), // poll?
maxUndoSteps(100), maxUndoSteps(100),
mainFontPath(""), mainFontPath(""),
headFontPath(""), headFontPath(""),

View file

@ -80,7 +80,8 @@ void FurnaceGUI::drawSysDefs(std::vector<FurnaceGUISysDef>& category, bool& acce
ImGui::PushTextWrapPos(MIN(scrW*dpiScale,400.0f*dpiScale)); ImGui::PushTextWrapPos(MIN(scrW*dpiScale,400.0f*dpiScale));
ImGui::Text("%s (x%d): ",sysDef->name,chipCounts[chip]); ImGui::Text("%s (x%d): ",sysDef->name,chipCounts[chip]);
ImGui::Text("%s",sysDef->description); ImGui::Text("%s",sysDef->description);
if (settings.sysTooltipChannelColors) drawSystemChannelInfo(sysDef); if (settings.sysTooltipChanInfoStyle&1) drawSystemChannelInfoText(sysDef);
if (settings.sysTooltipChanInfoStyle&2) drawSystemChannelInfo(sysDef);
ImGui::PopTextWrapPos(); ImGui::PopTextWrapPos();
if (chipIndex+1<chips.size()) { if (chipIndex+1<chips.size()) {
ImGui::Separator(); ImGui::Separator();

View file

@ -2760,11 +2760,25 @@ void FurnaceGUI::drawSettings() {
settingsChanged=true; settingsChanged=true;
} }
bool sysTooltipChannelColorsB=settings.sysTooltipChannelColors; ImGui::Text("System tooltip channel information style:");
if (ImGui::Checkbox("Show channel count with colors in the system info tooltips",&sysTooltipChannelColorsB)) { // poor wording ImGui::Indent();
settings.sysTooltipChannelColors=sysTooltipChannelColorsB; if (ImGui::RadioButton("None##stciNO",settings.sysTooltipChanInfoStyle==0)) {
settings.sysTooltipChanInfoStyle=0;
settingsChanged=true; settingsChanged=true;
} }
if (ImGui::RadioButton("Text##stciTX",settings.sysTooltipChanInfoStyle==1)) {
settings.sysTooltipChanInfoStyle=1;
settingsChanged=true;
}
if (ImGui::RadioButton("Color... things?##stciCO",settings.sysTooltipChanInfoStyle==2)) {
settings.sysTooltipChanInfoStyle=2; // retext!!!
settingsChanged=true;
}
if (ImGui::RadioButton("Both##stciTC",settings.sysTooltipChanInfoStyle==3)) {
settings.sysTooltipChanInfoStyle=3;
settingsChanged=true;
}
ImGui::Unindent();
// SUBSECTION ORDERS // SUBSECTION ORDERS
CONFIG_SUBSECTION("Orders"); CONFIG_SUBSECTION("Orders");
@ -4132,7 +4146,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
settings.controlLayout=conf.getInt("controlLayout",3); settings.controlLayout=conf.getInt("controlLayout",3);
settings.classicChipOptions=conf.getInt("classicChipOptions",0); settings.classicChipOptions=conf.getInt("classicChipOptions",0);
settings.chipManagerTooltip=conf.getInt("chipManagerTooltip",0); settings.chipManagerTooltip=conf.getInt("chipManagerTooltip",0);
settings.sysTooltipChannelColors=conf.getInt("sysTooltipChannelColors",0); settings.sysTooltipChanInfoStyle=conf.getInt("sysTooltipChanInfoStyle",0);
} }
if (groups&GUI_SETTINGS_COLOR) { if (groups&GUI_SETTINGS_COLOR) {
@ -4352,7 +4366,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
clampSetting(settings.oscLineSize,0.25f,16.0f); clampSetting(settings.oscLineSize,0.25f,16.0f);
clampSetting(settings.cursorWheelStep,0,1); clampSetting(settings.cursorWheelStep,0,1);
clampSetting(settings.chipManagerTooltip,0,1); clampSetting(settings.chipManagerTooltip,0,1);
clampSetting(settings.sysTooltipChannelColors,0,1); clampSetting(settings.sysTooltipChanInfoStyle,0,3);
if (settings.exportLoops<0.0) settings.exportLoops=0.0; if (settings.exportLoops<0.0) settings.exportLoops=0.0;
if (settings.exportFadeOut<0.0) settings.exportFadeOut=0.0; if (settings.exportFadeOut<0.0) settings.exportFadeOut=0.0;
@ -4611,7 +4625,7 @@ void FurnaceGUI::writeConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
conf.set("controlLayout",settings.controlLayout); conf.set("controlLayout",settings.controlLayout);
conf.set("classicChipOptions",settings.classicChipOptions); conf.set("classicChipOptions",settings.classicChipOptions);
conf.set("chipManagerTooltip",settings.chipManagerTooltip); conf.set("chipManagerTooltip",settings.chipManagerTooltip);
conf.set("sysTooltipChannelColors",settings.sysTooltipChannelColors); conf.set("sysTooltipChanInfoStyle",settings.sysTooltipChanInfoStyle);
} }
// color // color

View file

@ -94,9 +94,9 @@ void FurnaceGUI::drawSysManager() {
if (ImGui::BeginTooltip()) { if (ImGui::BeginTooltip()) {
ImGui::PushTextWrapPos(ImGui::GetCursorPos().x+420); // arbitrary constant ImGui::PushTextWrapPos(ImGui::GetCursorPos().x+420); // arbitrary constant
ImGui::TextWrapped("%s",sysDef->description); ImGui::TextWrapped("%s",sysDef->description);
drawSystemChannelInfoText(sysDef); if (settings.sysTooltipChanInfoStyle&1) drawSystemChannelInfoText(sysDef);
if (settings.sysTooltipChanInfoStyle&2) drawSystemChannelInfo(sysDef);
ImGui::PopTextWrapPos(); ImGui::PopTextWrapPos();
if (settings.sysTooltipChannelColors) drawSystemChannelInfo(sysDef);
ImGui::EndTooltip(); ImGui::EndTooltip();
} }
} }

View file

@ -90,6 +90,8 @@ DivSystem FurnaceGUI::systemPicker() {
if (hoveredSys!=DIV_SYSTEM_NULL) { if (hoveredSys!=DIV_SYSTEM_NULL) {
const DivSysDef* sysDef=e->getSystemDef(hoveredSys); const DivSysDef* sysDef=e->getSystemDef(hoveredSys);
ImGui::TextWrapped("%s",sysDef->description); ImGui::TextWrapped("%s",sysDef->description);
if (settings.sysTooltipChanInfoStyle&1) drawSystemChannelInfoText(sysDef);
if (settings.sysTooltipChanInfoStyle&2) drawSystemChannelInfo(sysDef);
} }
} }
ImGui::EndChild(); ImGui::EndChild();