Merge branch 'Eknous-P/that_cursed_tooltip'

This commit is contained in:
tildearrow 2024-10-11 02:03:12 -05:00
commit f80dd764f3
6 changed files with 18 additions and 2 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

@ -81,6 +81,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();
drawSystemChannelInfoText(sysDef); drawSystemChannelInfoText(sysDef);
drawSystemChannelInfo(sysDef); drawSystemChannelInfo(sysDef);
ImGui::PopTextWrapPos(); ImGui::PopTextWrapPos();

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();
drawSystemChannelInfoText(sysDef); drawSystemChannelInfoText(sysDef);
drawSystemChannelInfo(sysDef); 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+1.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+1.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();
drawSystemChannelInfoText(sysDef); drawSystemChannelInfoText(sysDef);
drawSystemChannelInfo(sysDef); drawSystemChannelInfo(sysDef);
} }