Changed behavior of MediaPlayer: offer to either follow the active

source or to show a fixed MediaPlayer. List of available mediaplayers is
maintained statically at the level of MediaPlayer class.
This commit is contained in:
brunoherbelin
2020-07-10 19:01:17 +02:00
parent 9be5495a05
commit b837e7bf8b
5 changed files with 203 additions and 104 deletions

View File

@@ -21,6 +21,7 @@
#include "imgui.h"
#include "ImGuiToolkit.h"
#include "UserInterfaceManager.h"
#include "SystemToolkit.h"
@@ -285,8 +286,9 @@ void ImGuiVisitor::visit (MediaSource& s)
}
else {
ImGui::Text("Video File");
if ( ImGui::Button(IMGUI_TITLE_MEDIAPLAYER, ImVec2(IMGUI_RIGHT_ALIGN, 0)) )
Settings::application.widget.media_player = true;
if ( ImGui::Button(IMGUI_TITLE_MEDIAPLAYER, ImVec2(IMGUI_RIGHT_ALIGN, 0)) ) {
UserInterface::manager().showMediaPlayer( s.mediaplayer());
}
}
ImGuiToolkit::ButtonOpenUrl( SystemToolkit::path_filename(s.path()).c_str(), ImVec2(IMGUI_RIGHT_ALIGN, 0) );
}