mirror of
https://github.com/tildearrow/furnace.git
synced 2024-12-04 10:17:26 +00:00
sys tooltip/info: requseted changes + swan chans all can wavetbl
This commit is contained in:
parent
cbe4345ce7
commit
ae1b9a3901
2 changed files with 9 additions and 3 deletions
|
@ -92,7 +92,7 @@ void FurnaceGUI::drawSysManager() {
|
||||||
if (e->song.system[i]!=DIV_SYSTEM_NULL) {
|
if (e->song.system[i]!=DIV_SYSTEM_NULL) {
|
||||||
const DivSysDef* sysDef=e->getSystemDef(e->song.system[i]);
|
const DivSysDef* sysDef=e->getSystemDef(e->song.system[i]);
|
||||||
if (ImGui::BeginTooltip()) {
|
if (ImGui::BeginTooltip()) {
|
||||||
ImGui::PushTextWrapPos(ImGui::GetCursorPos().x+420); // arbitrary constant
|
ImGui::PushTextWrapPos(420.0f*dpiScale); // arbitrary constant
|
||||||
ImGui::TextWrapped("%s",sysDef->description);
|
ImGui::TextWrapped("%s",sysDef->description);
|
||||||
if (settings.sysTooltipChanInfoStyle&1) drawSystemChannelInfoText(sysDef);
|
if (settings.sysTooltipChanInfoStyle&1) drawSystemChannelInfoText(sysDef);
|
||||||
if (settings.sysTooltipChanInfoStyle&2) drawSystemChannelInfo(sysDef);
|
if (settings.sysTooltipChanInfoStyle&2) drawSystemChannelInfo(sysDef);
|
||||||
|
|
|
@ -303,7 +303,7 @@ void FurnaceGUI::drawSystemChannelInfo(const DivSysDef* whichDef) {
|
||||||
void FurnaceGUI::drawSystemChannelInfoText(const DivSysDef* whichDef) {
|
void FurnaceGUI::drawSystemChannelInfoText(const DivSysDef* whichDef) {
|
||||||
String info="";
|
String info="";
|
||||||
// same order as chanNames
|
// 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];
|
unsigned char chanCount[CHANNEL_TYPE_MAX];
|
||||||
memset(chanCount,0,CHANNEL_TYPE_MAX);
|
memset(chanCount,0,CHANNEL_TYPE_MAX);
|
||||||
// count channel types
|
// count channel types
|
||||||
|
@ -391,6 +391,12 @@ void FurnaceGUI::drawSystemChannelInfoText(const DivSysDef* whichDef) {
|
||||||
chanCount[whichDef->chanTypes[i]]++;
|
chanCount[whichDef->chanTypes[i]]++;
|
||||||
}
|
}
|
||||||
break;
|
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_C64: // uncategorizable (by me)
|
||||||
case DIV_INS_TIA:
|
case DIV_INS_TIA:
|
||||||
case DIV_INS_PET:
|
case DIV_INS_PET:
|
||||||
|
@ -421,7 +427,7 @@ void FurnaceGUI::drawSystemChannelInfoText(const DivSysDef* whichDef) {
|
||||||
}
|
}
|
||||||
continue;
|
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());
|
ImGui::Text("%s",info.c_str());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue