sys tooltip/info: requseted changes + swan chans all can wavetbl

This commit is contained in:
Eknous-P 2024-10-02 14:57:02 +04:00
parent cbe4345ce7
commit ae1b9a3901
2 changed files with 9 additions and 3 deletions

View file

@ -92,7 +92,7 @@ void FurnaceGUI::drawSysManager() {
if (e->song.system[i]!=DIV_SYSTEM_NULL) {
const DivSysDef* sysDef=e->getSystemDef(e->song.system[i]);
if (ImGui::BeginTooltip()) {
ImGui::PushTextWrapPos(ImGui::GetCursorPos().x+420); // arbitrary constant
ImGui::PushTextWrapPos(420.0f*dpiScale); // arbitrary constant
ImGui::TextWrapped("%s",sysDef->description);
if (settings.sysTooltipChanInfoStyle&1) drawSystemChannelInfoText(sysDef);
if (settings.sysTooltipChanInfoStyle&2) drawSystemChannelInfo(sysDef);

View file

@ -303,7 +303,7 @@ void FurnaceGUI::drawSystemChannelInfo(const DivSysDef* whichDef) {
void FurnaceGUI::drawSystemChannelInfoText(const DivSysDef* whichDef) {
String info="";
// same order as chanNames
// helper: FM|PU|NO|WA|SA|SQ|TR|SW|OP|DR|SL|VE|CH
// helper: FM|PU|NO|WA|SA | SQ|TR|SW|OP|DR|SL|WV|CH
unsigned char chanCount[CHANNEL_TYPE_MAX];
memset(chanCount,0,CHANNEL_TYPE_MAX);
// count channel types
@ -391,6 +391,12 @@ void FurnaceGUI::drawSystemChannelInfoText(const DivSysDef* whichDef) {
chanCount[whichDef->chanTypes[i]]++;
}
break;
case DIV_INS_SWAN:
if (whichDef->chanTypes[i]!=DIV_CH_WAVE) {
chanCount[CHANNEL_TYPE_WAVETABLE]++;
}
chanCount[whichDef->chanTypes[i]]++;
break;
case DIV_INS_C64: // uncategorizable (by me)
case DIV_INS_TIA:
case DIV_INS_PET:
@ -421,7 +427,7 @@ void FurnaceGUI::drawSystemChannelInfoText(const DivSysDef* whichDef) {
}
continue;
}
info+=fmt::sprintf("%d x %s",chanCount[i],chanNames[i]);
info+=fmt::sprintf("%d × %s",chanCount[i],chanNames[i]);
}
ImGui::Text("%s",info.c_str());
}