proper setting name, fix overflow by making smaller, ay is psg, sid3 case

im done
please
This commit is contained in:
Eknous-P 2024-10-10 23:17:52 +04:00
parent 6e47a119fa
commit a061639f4b
7 changed files with 20 additions and 3 deletions

View file

@ -252,6 +252,7 @@ const char* chanNames[CHANNEL_TYPE_MAX+1]={
_N("Drums"), _N("Drums"),
_N("Slope"), // PowerNoise _N("Slope"), // PowerNoise
_N("Wave"), // not wavetable (VERA, 5E01) _N("Wave"), // not wavetable (VERA, 5E01)
_N("PSG"),
_N("Channel"), // if neither _N("Channel"), // if neither
_N("Channels") // in case this makes l10n easier _N("Channels") // in case this makes l10n easier

View file

@ -35,6 +35,7 @@ enum FurnaceGUIChanTypes {
CHANNEL_TYPE_DRUMS, CHANNEL_TYPE_DRUMS,
CHANNEL_TYPE_SLOPE, CHANNEL_TYPE_SLOPE,
CHANNEL_TYPE_WAVE, CHANNEL_TYPE_WAVE,
CHANNEL_TYPE_PSG,
CHANNEL_TYPE_OTHER, CHANNEL_TYPE_OTHER,
CHANNEL_TYPE_MAX CHANNEL_TYPE_MAX

View file

@ -21,6 +21,7 @@
#include "misc/cpp/imgui_stdlib.h" #include "misc/cpp/imgui_stdlib.h"
#include <fmt/printf.h> #include <fmt/printf.h>
#include <algorithm> #include <algorithm>
#include <imgui.h>
String sysDefID; String sysDefID;
@ -81,6 +82,7 @@ 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);
ImGui::Separator();
if (settings.sysTooltipChanInfoStyle&1) drawSystemChannelInfoText(sysDef); if (settings.sysTooltipChanInfoStyle&1) drawSystemChannelInfoText(sysDef);
if (settings.sysTooltipChanInfoStyle&2) drawSystemChannelInfo(sysDef); if (settings.sysTooltipChanInfoStyle&2) drawSystemChannelInfo(sysDef);
ImGui::PopTextWrapPos(); ImGui::PopTextWrapPos();

View file

@ -3331,7 +3331,7 @@ void FurnaceGUI::drawSettings() {
settings.sysTooltipChanInfoStyle=1; settings.sysTooltipChanInfoStyle=1;
settingsChanged=true; settingsChanged=true;
} }
if (ImGui::RadioButton("Color... things?##stciCO",settings.sysTooltipChanInfoStyle==2)) { if (ImGui::RadioButton("Color tiles##stciCO",settings.sysTooltipChanInfoStyle==2)) {
settings.sysTooltipChanInfoStyle=2; // retext!!! settings.sysTooltipChanInfoStyle=2; // retext!!!
settingsChanged=true; settingsChanged=true;
} }

View file

@ -94,6 +94,7 @@ void FurnaceGUI::drawSysManager() {
if (ImGui::BeginTooltip()) { if (ImGui::BeginTooltip()) {
ImGui::PushTextWrapPos(420.0f*dpiScale); // arbitrary constant ImGui::PushTextWrapPos(420.0f*dpiScale); // arbitrary constant
ImGui::TextWrapped("%s",sysDef->description); ImGui::TextWrapped("%s",sysDef->description);
ImGui::Separator();
if (settings.sysTooltipChanInfoStyle&1) drawSystemChannelInfoText(sysDef); if (settings.sysTooltipChanInfoStyle&1) drawSystemChannelInfoText(sysDef);
if (settings.sysTooltipChanInfoStyle&2) drawSystemChannelInfo(sysDef); if (settings.sysTooltipChanInfoStyle&2) drawSystemChannelInfo(sysDef);
ImGui::PopTextWrapPos(); ImGui::PopTextWrapPos();

View file

@ -300,8 +300,8 @@ void FurnaceGUI::drawSystemChannelInfo(const DivSysDef* whichDef) {
float scaler=5.0f*dpiScale; float scaler=5.0f*dpiScale;
float x=p.x+dpiScale; float x=p.x+dpiScale;
for (int i=0; i<whichDef->channels; i++) { 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+1.5f*scaler,p.y+3.0f*scaler),ImGui::GetColorU32(uiColors[whichDef->chanTypes[i]+GUI_COLOR_CHANNEL_FM]),scaler);
x+=3.0f*scaler; x+=2.0f*scaler;
} }
ImGui::Dummy(ImVec2(0,4*scaler)); ImGui::Dummy(ImVec2(0,4*scaler));
} }
@ -342,6 +342,10 @@ void FurnaceGUI::drawSystemChannelInfoText(const DivSysDef* whichDef) {
chanCount[whichDef->chanTypes[i]]++; chanCount[whichDef->chanTypes[i]]++;
} }
break; break;
case DIV_INS_AY:
case DIV_INS_AY8930:
chanCount[CHANNEL_TYPE_PSG]++;
break;
case DIV_INS_OPL_DRUMS: case DIV_INS_OPL_DRUMS:
case DIV_INS_OPL: case DIV_INS_OPL:
case DIV_INS_OPLL: case DIV_INS_OPLL:
@ -403,6 +407,13 @@ void FurnaceGUI::drawSystemChannelInfoText(const DivSysDef* whichDef) {
} }
chanCount[whichDef->chanTypes[i]]++; chanCount[whichDef->chanTypes[i]]++;
break; break;
case DIV_INS_SID3:
if (whichDef->chanTypes[i]!=DIV_CH_WAVE) {
chanCount[CHANNEL_TYPE_OTHER]++;
} else {
chanCount[CHANNEL_TYPE_WAVE]++;
}
break;
case DIV_INS_C64: // uncategorizable (by me) case DIV_INS_C64: // uncategorizable (by me)
case DIV_INS_TIA: case DIV_INS_TIA:
case DIV_INS_PET: case DIV_INS_PET:

View file

@ -92,6 +92,7 @@ DivSystem FurnaceGUI::systemPicker(bool fullWidth) {
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);
ImGui::Separator();
if (settings.sysTooltipChanInfoStyle&1) drawSystemChannelInfoText(sysDef); if (settings.sysTooltipChanInfoStyle&1) drawSystemChannelInfoText(sysDef);
if (settings.sysTooltipChanInfoStyle&2) drawSystemChannelInfo(sysDef); if (settings.sysTooltipChanInfoStyle&2) drawSystemChannelInfo(sysDef);
} }