mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Display Info of created source in Preview
This commit is contained in:
@@ -6192,6 +6192,8 @@ Source * SourcePreview::getSource()
|
|||||||
|
|
||||||
void SourcePreview::Render(float width)
|
void SourcePreview::Render(float width)
|
||||||
{
|
{
|
||||||
|
static InfoVisitor _info;
|
||||||
|
|
||||||
if(source_) {
|
if(source_) {
|
||||||
// cancel if failed
|
// cancel if failed
|
||||||
if (source_->failed()) {
|
if (source_->failed()) {
|
||||||
@@ -6241,8 +6243,10 @@ void SourcePreview::Render(float width)
|
|||||||
ImGuiToolkit::Icon(source_->icon().x, source_->icon().y);
|
ImGuiToolkit::Icon(source_->icon().x, source_->icon().y);
|
||||||
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::Text("%s", label_.c_str());
|
ImGui::Text("%s", label_.c_str());
|
||||||
if (source_->ready())
|
if (source_->ready()) {
|
||||||
ImGui::Text("%d x %d %s", frame->width(), frame->height(), frame->use_alpha() ? "RGBA" : "RGB");
|
source_->accept(_info);
|
||||||
|
ImGui::Text("%s", _info.str().c_str());
|
||||||
|
}
|
||||||
else
|
else
|
||||||
ImGui::Text("loading...");
|
ImGui::Text("loading...");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user