mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-13 19:29:58 +01:00
Bugfix display Capture menu
And addedactive label to enable restore default
This commit is contained in:
@@ -292,11 +292,12 @@ void OutputPreviewWindow::Render()
|
|||||||
ImGui::MenuItem( MENU_RECORDCONT, SHORTCUT_RECORDCONT, false, false);
|
ImGui::MenuItem( MENU_RECORDCONT, SHORTCUT_RECORDCONT, false, false);
|
||||||
ImGui::PopStyleColor(1);
|
ImGui::PopStyleColor(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Options menu
|
// Options menu
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
ImGui::MenuItem("Settings", nullptr, false, false);
|
ImGui::MenuItem("Settings", nullptr, false, false);
|
||||||
// offer to open config panel from here for more options
|
// offer to open config panel from here for more options
|
||||||
ImGui::SameLine(ImGui::GetContentRegionAvailWidth() + 1.2f * IMGUI_RIGHT_ALIGN);
|
ImGui::SameLine(ImGui::GetContentRegionAvailWidth() + 1.3f * IMGUI_RIGHT_ALIGN);
|
||||||
if (ImGuiToolkit::IconButton(13, 5, "Advanced settings"))
|
if (ImGuiToolkit::IconButton(13, 5, "Advanced settings"))
|
||||||
UserInterface::manager().navigator.showConfig();
|
UserInterface::manager().navigator.showConfig();
|
||||||
|
|
||||||
@@ -313,34 +314,46 @@ void OutputPreviewWindow::Render()
|
|||||||
Settings::application.record.path = SystemToolkit::home_path();
|
Settings::application.record.path = SystemToolkit::home_path();
|
||||||
snprintf( name_path[0], 1024, "%s", Settings::application.record.path.c_str());
|
snprintf( name_path[0], 1024, "%s", Settings::application.record.path.c_str());
|
||||||
int selected_path = 0;
|
int selected_path = 0;
|
||||||
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
ImGui::SetNextItemWidth(1.4f * IMGUI_RIGHT_ALIGN);
|
||||||
ImGui::Combo("Path", &selected_path, name_path, 4);
|
if (ImGui::Combo("##Path", &selected_path, name_path, 4) ) {
|
||||||
if (selected_path > 2)
|
if (selected_path > 2)
|
||||||
recordFolderDialog->open();
|
recordFolderDialog->open();
|
||||||
else if (selected_path > 1)
|
else if (selected_path > 1)
|
||||||
Settings::application.record.path = SystemToolkit::path_filename( Mixer::manager().session()->filename() );
|
Settings::application.record.path = SystemToolkit::path_filename( Mixer::manager().session()->filename() );
|
||||||
else if (selected_path > 0)
|
else if (selected_path > 0)
|
||||||
Settings::application.record.path = SystemToolkit::home_path();
|
Settings::application.record.path = SystemToolkit::home_path();
|
||||||
|
}
|
||||||
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
|
if (ImGuiToolkit::TextButton("Path"))
|
||||||
|
Settings::application.record.path = SystemToolkit::home_path();
|
||||||
|
|
||||||
// offer to open folder location
|
// offer to open folder location
|
||||||
ImVec2 draw_pos = ImGui::GetCursorPos();
|
ImVec2 draw_pos = ImGui::GetCursorPos();
|
||||||
ImGui::SetCursorPos(draw_pos + ImVec2(ImGui::GetContentRegionAvailWidth() - 1.2 * ImGui::GetTextLineHeightWithSpacing(), -ImGui::GetFrameHeight()) );
|
ImGui::SetCursorPos(draw_pos + ImVec2(ImGui::GetContentRegionAvailWidth() - 1.4 * ImGui::GetTextLineHeightWithSpacing(), -ImGui::GetFrameHeight()) );
|
||||||
if (ImGuiToolkit::IconButton( ICON_FA_FOLDER_OPEN, Settings::application.record.path.c_str()))
|
if (ImGuiToolkit::IconButton(3, 5, "Show in finder"))
|
||||||
SystemToolkit::open(Settings::application.record.path);
|
SystemToolkit::open(Settings::application.record.path);
|
||||||
ImGui::SetCursorPos(draw_pos);
|
ImGui::SetCursorPos(draw_pos);
|
||||||
|
|
||||||
// Naming menu selection
|
// Naming menu selection
|
||||||
static const char* naming_style[2] = { ICON_FA_SORT_NUMERIC_DOWN " Sequential", ICON_FA_CALENDAR " Date prefix" };
|
static const char* naming_style[2] = { ICON_FA_SORT_NUMERIC_DOWN " Sequential", ICON_FA_CALENDAR " Date prefix" };
|
||||||
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
ImGui::SetNextItemWidth(1.4f * IMGUI_RIGHT_ALIGN);
|
||||||
ImGui::Combo("Filename", &Settings::application.record.naming_mode, naming_style, IM_ARRAYSIZE(naming_style));
|
ImGui::Combo("##Filename", &Settings::application.record.naming_mode, naming_style, IM_ARRAYSIZE(naming_style));
|
||||||
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
|
if (ImGuiToolkit::TextButton("Filename"))
|
||||||
|
Settings::application.record.naming_mode = 1;
|
||||||
|
|
||||||
|
ImGui::SetNextItemWidth(1.4f * IMGUI_RIGHT_ALIGN);
|
||||||
|
ImGuiToolkit::SliderTiming ("##Duration", &Settings::application.record.timeout, 1000, RECORD_MAX_TIMEOUT, 1000, "Until stopped");
|
||||||
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
|
if (ImGuiToolkit::TextButton("Duration"))
|
||||||
|
Settings::application.record.timeout = RECORD_MAX_TIMEOUT;
|
||||||
|
|
||||||
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
ImGui::SetNextItemWidth(1.4f * IMGUI_RIGHT_ALIGN);
|
||||||
ImGuiToolkit::SliderTiming ("Duration", &Settings::application.record.timeout, 1000, RECORD_MAX_TIMEOUT, 1000, "Until stopped");
|
ImGui::SliderInt("##Trigger", &Settings::application.record.delay, 0, 5,
|
||||||
|
|
||||||
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
|
||||||
ImGui::SliderInt("Trigger", &Settings::application.record.delay, 0, 5,
|
|
||||||
Settings::application.record.delay < 1 ? "Immediate" : "After %d s");
|
Settings::application.record.delay < 1 ? "Immediate" : "After %d s");
|
||||||
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
|
if (ImGuiToolkit::TextButton("Trigger"))
|
||||||
|
Settings::application.record.delay = 0;
|
||||||
|
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user