proof of concept

This commit is contained in:
Eknous-P 2024-03-03 22:39:45 +04:00
parent 01c5e9a913
commit a061907db0
2 changed files with 15 additions and 1 deletions

View file

@ -691,7 +691,8 @@ void DivEngine::registerSystems() {
sysDefs[DIV_SYSTEM_SMS]=new DivSysDef(
"TI SN76489", NULL, 0x03, 0x03, 4, false, true, 0x150, false, 0, 0, 0,
"a square/noise sound chip found on the Sega Master System, ColecoVision, Tandy, TI's own 99/4A and a few other places.",
"a square/noise sound chip found on the Sega Master System, ColecoVision, Tandy, TI's own 99/4A and a few other places."
"\n\n3 x Square, 1 x Noise",
{"Square 1", "Square 2", "Square 3", "Noise"},
{"S1", "S2", "S3", "NO"},
{DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_NOISE},

View file

@ -82,10 +82,23 @@ void FurnaceGUI::drawSysManager() {
ImGui::EndDragDropTarget();
}
ImGui::TableNextColumn();
bool isNotCollapsed=true; // IM SORRY
if (ImGui::TreeNode(fmt::sprintf("%d. %s##_SYSM%d",i+1,getSystemName(e->song.system[i]),i).c_str())) {
drawSysConf(i,i,e->song.system[i],e->song.systemFlags[i],true);
isNotCollapsed=false;
ImGui::TreePop();
}
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()) { // why not SetTooltip()? so i can wrap the text
ImGui::PushTextWrapPos(ImGui::GetCursorPos().x+420); // arbitrary constant
ImGui::TextWrapped("%s",sysDef->description);
ImGui::PopTextWrapPos();
ImGui::EndTooltip();
}
}
}
ImGui::TableNextColumn();
if (ImGui::Button("Clone##SysDup")) {
if (!e->duplicateSystem(i,sysDupCloneChannels,sysDupEnd)) {