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

@ -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)) {