This commit is contained in:
brunoherbelin
2020-07-19 21:51:21 +02:00
parent cfb10c32b8
commit 31dcb13f5b
3 changed files with 21 additions and 14 deletions

View File

@@ -277,17 +277,18 @@ void ImGuiVisitor::visit (Source& s)
// geometry direct control
s.groupNode(View::GEOMETRY)->accept(*this);
if ( s.numClones() > 0 ) {
ImGui::Text("Cloned %d time%s", s.numClones(), s.numClones() > 1 ? "s." : ".");
}
}
void ImGuiVisitor::visit (MediaSource& s)
{
if ( s.mediaplayer()->duration() == GST_CLOCK_TIME_NONE) {
ImGuiToolkit::Icon(2,9);
ImGui::SameLine(0, 10);
ImGui::Text("Image File");
}
else {
ImGuiToolkit::Icon(18,13);
ImGui::SameLine(0, 10);
ImGui::Text("Video File");
if ( ImGui::Button(IMGUI_TITLE_MEDIAPLAYER, ImVec2(IMGUI_RIGHT_ALIGN, 0)) ) {
UserInterface::manager().showMediaPlayer( s.mediaplayer());
@@ -298,6 +299,8 @@ void ImGuiVisitor::visit (MediaSource& s)
void ImGuiVisitor::visit (SessionSource& s)
{
ImGuiToolkit::Icon(4,9);
ImGui::SameLine(0, 10);
ImGui::Text("Session File");
if ( ImGui::Button( ICON_FA_FILE_UPLOAD " Make Current", ImVec2(IMGUI_RIGHT_ALIGN, 0)) )
Mixer::manager().set( s.detach() );
@@ -309,6 +312,8 @@ void ImGuiVisitor::visit (SessionSource& s)
void ImGuiVisitor::visit (RenderSource& s)
{
ImGuiToolkit::Icon(19,1);
ImGui::SameLine(0, 10);
ImGui::Text("Rendering Output");
if ( ImGui::Button(IMGUI_TITLE_PREVIEW, ImVec2(IMGUI_RIGHT_ALIGN, 0)) )
Settings::application.widget.preview = true;
@@ -316,6 +321,8 @@ void ImGuiVisitor::visit (RenderSource& s)
void ImGuiVisitor::visit (CloneSource& s)
{
ImGuiToolkit::Icon(9,2);
ImGui::SameLine(0, 10);
ImGui::Text("Clone of %s", s.origin()->name().c_str());
std::string label = "Select " + s.origin()->name();
if ( ImGui::Button(label.c_str(), ImVec2(IMGUI_RIGHT_ALIGN, 0)) )

View File

@@ -849,7 +849,7 @@ void UserInterface::RenderPreview()
// menu (no title bar)
if (ImGui::BeginMenuBar())
{
if (ImGui::BeginMenu(ICON_FA_LAPTOP " Preview"))
if (ImGui::BeginMenu(ICON_FA_DESKTOP " Preview"))
{
if ( ImGui::MenuItem( ICON_FA_WINDOW_RESTORE " Show output window") )
Rendering::manager().outputWindow().show();
@@ -1032,7 +1032,7 @@ void MediaController::Render()
// display buttons Play/Stop depending on current playing mode
if (media_playing_mode_) {
if (ImGui::Button(ICON_FA_STOP " Stop"))
if (ImGui::Button(ICON_FA_PAUSE " Pause"))
media_playing_mode_ = false;
ImGui::SameLine(0, spacing);
@@ -1524,11 +1524,13 @@ void SourcePreview::draw(float width)
ImVec2 preview_size(width, width / source_->frame()->aspectRatio());
ImGui::Image((void*)(uintptr_t) source_->frame()->texture(), preview_size);
if (source_->ready()) {
ImVec2 pos = ImGui::GetCursorPos();
ImGui::SameLine();
if (ImGuiToolkit::IconToggle(9,7,1,8, &active))
source_->setActive(active);
ImGui::SetCursorPos(pos);
}
ImGui::Text("%s ", label_.c_str());
}
}
@@ -1684,7 +1686,6 @@ void Navigator::RenderTransitionPannel()
ImGui::Text("Behavior");
ImGuiToolkit::ButtonSwitch( ICON_FA_RANDOM " Cross fading", &Settings::application.transition.cross_fade);
ImGuiToolkit::ButtonSwitch( ICON_FA_SIGN_IN_ALT " Automatic open", &Settings::application.transition.auto_open);
// ImGuiToolkit::ButtonSwitch( ICON_FA_SIGN_OUT_ALT " Automatic start", &Settings::application.transition.auto_start);
// Transition options
ImGui::Text(" ");
@@ -1708,7 +1709,6 @@ void Navigator::RenderTransitionPannel()
ImGui::SameLine();
ImGuiToolkit::HelpMarker("Exit transition leaves the output 'as is',\nwith the newly openned session as a source\nif the transition is not finished.");
}
ImGui::End();
}

View File

@@ -45,7 +45,7 @@
#define IMGUI_TITLE_MEDIAPLAYER ICON_FA_FILM " Media Player"
#define IMGUI_TITLE_TOOLBOX ICON_FA_WRENCH " Tools"
#define IMGUI_TITLE_SHADEREDITOR ICON_FA_CODE " Shader Editor"
#define IMGUI_TITLE_PREVIEW ICON_FA_LAPTOP " Preview"
#define IMGUI_TITLE_PREVIEW ICON_FA_DESKTOP " Preview"
#define IMGUI_TITLE_DELETE ICON_FA_BROOM " Delete?"
#define IMGUI_RIGHT_ALIGN -3.5f * ImGui::GetTextLineHeightWithSpacing()
#define IMGUI_NOTIFICATION_DURATION 1.5f