GUI: too many settings

This commit is contained in:
tildearrow 2024-10-10 14:25:12 -05:00
parent 7f95179a0d
commit 936dd0a5ba
6 changed files with 8 additions and 44 deletions

View file

@ -1999,8 +1999,6 @@ class FurnaceGUI {
float vibrationStrength;
int vibrationLength;
int s3mOPL3;
int chipManagerTooltip;
int sysTooltipChanInfoStyle;
String mainFontPath;
String headFontPath;
String patFontPath;
@ -2260,8 +2258,6 @@ class FurnaceGUI {
vibrationStrength(0.5f),
vibrationLength(20),
s3mOPL3(1),
chipManagerTooltip(1),
sysTooltipChanInfoStyle(3),
mainFontPath(""),
headFontPath(""),
patFontPath(""),

View file

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

View file

@ -3315,32 +3315,6 @@ void FurnaceGUI::drawSettings() {
settingsChanged=true;
}
bool chipManagerTooltipB=settings.chipManagerTooltip;
if (ImGui::Checkbox("Show system tooltips in the chip manager",&chipManagerTooltipB)) {
settings.chipManagerTooltip=chipManagerTooltipB;
settingsChanged=true;
}
ImGui::Text("System tooltip channel information style:");
ImGui::Indent();
if (ImGui::RadioButton("None##stciNO",settings.sysTooltipChanInfoStyle==0)) {
settings.sysTooltipChanInfoStyle=0;
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
CONFIG_SUBSECTION(_("Orders"));
// sorry. temporarily disabled until ImGui has a way to add separators in tables arbitrarily.
@ -5092,8 +5066,6 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
settings.macroLayout=conf.getInt("macroLayout",0);
settings.controlLayout=conf.getInt("controlLayout",3);
settings.classicChipOptions=conf.getInt("classicChipOptions",0);
settings.chipManagerTooltip=conf.getInt("chipManagerTooltip",1);
settings.sysTooltipChanInfoStyle=conf.getInt("sysTooltipChanInfoStyle",3);
}
if (groups&GUI_SETTINGS_COLOR) {
@ -5399,8 +5371,6 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
clampSetting(settings.autoFillSave,0,1);
clampSetting(settings.autoMacroStepSize,0,2);
clampSetting(settings.s3mOPL3,0,1);
clampSetting(settings.chipManagerTooltip,0,1);
clampSetting(settings.sysTooltipChanInfoStyle,0,3);
if (settings.exportLoops<0.0) settings.exportLoops=0.0;
if (settings.exportFadeOut<0.0) settings.exportFadeOut=0.0;
@ -5687,8 +5657,6 @@ void FurnaceGUI::writeConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
conf.set("macroLayout",settings.macroLayout);
conf.set("controlLayout",settings.controlLayout);
conf.set("classicChipOptions",settings.classicChipOptions);
conf.set("chipManagerTooltip",settings.chipManagerTooltip);
conf.set("sysTooltipChanInfoStyle",settings.sysTooltipChanInfoStyle);
}
// color

View file

@ -88,14 +88,14 @@ void FurnaceGUI::drawSysManager() {
isNotCollapsed=false;
ImGui::TreePop();
}
if (ImGui::IsItemHovered(ImGuiHoveredFlags_Stationary) && isNotCollapsed && settings.chipManagerTooltip) {
if (ImGui::IsItemHovered(ImGuiHoveredFlags_Stationary) && isNotCollapsed) {
if (e->song.system[i]!=DIV_SYSTEM_NULL) {
const DivSysDef* sysDef=e->getSystemDef(e->song.system[i]);
if (ImGui::BeginTooltip()) {
ImGui::PushTextWrapPos(420.0f*dpiScale); // arbitrary constant
ImGui::TextWrapped("%s",sysDef->description);
if (settings.sysTooltipChanInfoStyle&1) drawSystemChannelInfoText(sysDef);
if (settings.sysTooltipChanInfoStyle&2) drawSystemChannelInfo(sysDef);
drawSystemChannelInfoText(sysDef);
drawSystemChannelInfo(sysDef);
ImGui::PopTextWrapPos();
ImGui::EndTooltip();
}

View file

@ -300,7 +300,7 @@ void FurnaceGUI::drawSystemChannelInfo(const DivSysDef* whichDef) {
float scaler=5.0f*dpiScale;
float x=p.x+dpiScale;
for (int i=0; i<whichDef->channels; i++) {
dl->AddRectFilled(ImVec2(x,p.y),ImVec2(x+2.0f*scaler,p.y+4.0f*scaler),ImGui::GetColorU32(uiColors[whichDef->chanTypes[i]+GUI_COLOR_CHANNEL_FM]),scaler);
dl->AddRectFilled(ImVec2(x,p.y),ImVec2(x+2.0f*scaler,p.y+1.0f*scaler),ImGui::GetColorU32(uiColors[whichDef->chanTypes[i]+GUI_COLOR_CHANNEL_FM]),scaler);
x+=3.0f*scaler;
}
ImGui::Dummy(ImVec2(0,4*scaler));

View file

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