BugFix Transition Cross Fading temporarily disabled when faded

When session is already fade to black, the cross fading transition cannot be used. Added an icon in left panel to allow user to set the transition mode
This commit is contained in:
Bruno Herbelin
2024-11-16 11:01:51 +01:00
parent 7e2a34a825
commit 5a933beb16
3 changed files with 30 additions and 5 deletions

View File

@@ -5560,10 +5560,21 @@ void Navigator::RenderMainPannelPlaylist()
ImGuiToolkit::HelpToolTip("Double-clic on a filename to open the session.\n\n"
ICON_FA_ARROW_CIRCLE_RIGHT " enable Smooth transition "
"to perform a cross fading with the current session.");
// toggle button for smooth transition
ImGui::SetCursorPos( ImVec2( pannel_width_ IMGUI_RIGHT_ALIGN, pos_top.y - ImGui::GetFrameHeightWithSpacing()) );
ImGuiToolkit::ButtonToggle(ICON_FA_ARROW_CIRCLE_RIGHT, &Settings::application.smooth_transition, "Smooth transition");
// transition mode icon if enabled
if (Settings::application.smooth_transition) {
const char *tooltip[2] = {"Fade to black", "Cross fading"};
ImGui::SameLine(0, IMGUI_SAME_LINE);
if (Mixer::manager().session()->fading() > 0.01)
ImGuiToolkit::Icon(9, 8, false);
else
ImGuiToolkit::IconToggle(9, 8, 0, 8, &Settings::application.transition.cross_fade, tooltip );
}
//
// Popup window to create playlist
//