Added delay and image selection to CloneSource

This commit is contained in:
Bruno Herbelin
2022-01-15 00:15:52 +01:00
parent 3678e8fb27
commit e58041227b
8 changed files with 211 additions and 26 deletions

View File

@@ -714,6 +714,20 @@ void ImGuiVisitor::visit (CloneSource& s)
Mixer::manager().setCurrentSource(s.origin());
ImGui::SameLine();
ImGui::Text("Source");
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
int m = (int) s.imageMode();
if (ImGui::Combo("Image", &m, "Original\0Post-processed\0") )
s.setImageMode((CloneSource::CloneImageMode)m);
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
float d = s.delay();
// if (ImGui::SliderFloat("Delay", &d, 0.f, 1.f, "%.2f s")){
if (ImGui::SliderFloat("Delay", &d, 0.f, 1.f, d < 0.01f ? "None" : "%.2f s")){
s.setDelay(d);
}
}
void ImGuiVisitor::visit (PatternSource& s)