mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-05 15:30:00 +01:00
Add mouse over on sourece preview in side panel to show original source image
This commit is contained in:
@@ -432,8 +432,14 @@ void ImGuiVisitor::visit (Source& s)
|
||||
}
|
||||
// centered image
|
||||
if (s.ready()) {
|
||||
ImGui::SetCursorPos( ImVec2(pos.x + 0.5f * (preview_width-width), pos.y + 0.5f * (preview_height-height-space)) );
|
||||
ImVec2 dpos = ImVec2(pos.x + 0.5f * (preview_width-width), pos.y + 0.5f * (preview_height-height-space));
|
||||
ImGui::SetCursorPos( dpos );
|
||||
ImGui::Image((void*)(uintptr_t) s.frame()->texture(), ImVec2(width, height));
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetCursorPos( dpos );
|
||||
ImGui::Image((void*)(uintptr_t) s.texture(), ImVec2(width, height));
|
||||
ImGuiToolkit::ToolTip("Source original image");
|
||||
}
|
||||
} else {
|
||||
ImGuiToolkit::PushFont(ImGuiToolkit::FONT_LARGE);
|
||||
ImGui::SetCursorPos(
|
||||
|
||||
Reference in New Issue
Block a user