mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-13 19:29:58 +01:00
Display Output resolution in preview window.
This commit is contained in:
@@ -733,9 +733,17 @@ void UserInterface::RenderPreview()
|
|||||||
if (ImGui::Selectable("##preview", false, ImGuiSelectableFlags_PressedOnClick, imagesize))
|
if (ImGui::Selectable("##preview", false, ImGuiSelectableFlags_PressedOnClick, imagesize))
|
||||||
Rendering::manager().outputWindow().show();
|
Rendering::manager().outputWindow().show();
|
||||||
ImGui::SetCursorScreenPos(draw_pos);
|
ImGui::SetCursorScreenPos(draw_pos);
|
||||||
|
|
||||||
// preview image
|
// preview image
|
||||||
ImGui::Image((void*)(intptr_t)output->texture(), imagesize);
|
ImGui::Image((void*)(intptr_t)output->texture(), imagesize);
|
||||||
|
// tooltip overlay
|
||||||
|
if (ImGui::IsItemHovered()) {
|
||||||
|
|
||||||
|
ImDrawList* draw_list = ImGui::GetWindowDrawList();
|
||||||
|
draw_list->AddRectFilled(draw_pos, ImVec2(draw_pos.x + width, draw_pos.y + ImGui::GetTextLineHeightWithSpacing()), IM_COL32(55, 55, 55, 200));
|
||||||
|
|
||||||
|
ImGui::SetCursorScreenPos(draw_pos);
|
||||||
|
ImGui::Text(" %d x %d px, %.1f fps", output->width(), output->height(), ImGui::GetIO().Framerate );
|
||||||
|
}
|
||||||
|
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user