put sorting checkboxes in a treenode

This commit is contained in:
Eknous-P 2023-07-26 18:53:39 +04:00
parent 1c94975a0a
commit 54d4097146

View file

@ -12,7 +12,8 @@ void FurnaceGUI::drawEffectList() {
ImGui::SetNextWindowSizeConstraints(ImVec2(60.0f*dpiScale,20.0f*dpiScale),ImVec2(canvasW,canvasH)); ImGui::SetNextWindowSizeConstraints(ImVec2(60.0f*dpiScale,20.0f*dpiScale),ImVec2(canvasW,canvasH));
if (ImGui::Begin("Effect List",&effectListOpen,globalWinFlags)) { if (ImGui::Begin("Effect List",&effectListOpen,globalWinFlags)) {
ImGui::Text("Chip at cursor: %s",e->getSystemName(e->sysOfChan[cursor.xCoarse])); ImGui::Text("Chip at cursor: %s",e->getSystemName(e->sysOfChan[cursor.xCoarse]));
ImGui::Text("Sort Effects:"); // ImGui::Text("Sort Effects:");
if (ImGui::TreeNode("Sort Effects")) {
ImGui::Checkbox("All",&effectShowAll); ImGui::Checkbox("All",&effectShowAll);
if (effectShowAll) { if (effectShowAll) {
effectShowMisc = true; effectShowMisc = true;
@ -25,25 +26,26 @@ void FurnaceGUI::drawEffectList() {
effectShowSysPrimary = true; effectShowSysPrimary = true;
effectShowSysSecondary = true; effectShowSysSecondary = true;
} }
ImGui::SameLine(); // ImGui::SameLine();
ImGui::Checkbox("Pitch",&effectShowPitch); ImGui::Checkbox("Pitch",&effectShowPitch);
ImGui::SameLine(); // ImGui::SameLine();
ImGui::Checkbox("Song",&effectShowSong); ImGui::Checkbox("Song",&effectShowSong);
ImGui::SameLine(); // ImGui::SameLine();
ImGui::Checkbox("Time",&effectShowTime); ImGui::Checkbox("Time",&effectShowTime);
ImGui::SameLine(); // ImGui::SameLine();
ImGui::Checkbox("Speed",&effectShowSpeed); ImGui::Checkbox("Speed",&effectShowSpeed);
ImGui::SameLine(); // ImGui::SameLine();
ImGui::Checkbox("Panning",&effectShowPanning); ImGui::Checkbox("Panning",&effectShowPanning);
// ImGui::SameLine(); // ImGui::SameLine();
ImGui::Checkbox("Volume",&effectShowVolume); ImGui::Checkbox("Volume",&effectShowVolume);
ImGui::SameLine(); // ImGui::SameLine();
ImGui::Checkbox("System (primary)",&effectShowSysPrimary); ImGui::Checkbox("System (primary)",&effectShowSysPrimary);
ImGui::SameLine(); // ImGui::SameLine();
ImGui::Checkbox("System (secondary)",&effectShowSysSecondary); ImGui::Checkbox("System (secondary)",&effectShowSysSecondary);
ImGui::SameLine(); // ImGui::SameLine();
ImGui::Checkbox("Miscellanious",&effectShowMisc); ImGui::Checkbox("Miscellanious",&effectShowMisc);
ImGui::TreePop();
}
effectShowAll = effectShowMisc && effectShowPanning && effectShowPitch && effectShowVolume && effectShowSong && effectShowTime && effectShowSpeed && effectShowSysPrimary && effectShowSysSecondary; effectShowAll = effectShowMisc && effectShowPanning && effectShowPitch && effectShowVolume && effectShowSong && effectShowTime && effectShowSpeed && effectShowSysPrimary && effectShowSysSecondary;
if (ImGui::BeginTable("effectList",2)) { if (ImGui::BeginTable("effectList",2)) {