You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I haven't tested other keys, but If you use ImGui::SetItemKeyOwner(ImGuiKey_MouseWheelY) on Images, it doesn't work as you can still scroll on the window.
I needed to do this because in my project I'm writing a 2D animation editor where you can preview the image and zoom in/out, but I can't have the window scroll along with the image.
The only thing I've tried was calling SetItemKeyOwner before Image, but that of course did not fix the problem.
Screenshots/Video:
Minimal, Complete and Verifiable Example code:
ImGui::Begin("Hello, world!");
ImGui::Button("Scrolling doesn't work on this button as expected:");
ImGui::SetItemKeyOwner(ImGuiKey_MouseWheelY);
ImGui::Text("But scrolling still works on this image:");
ImGui::Image(0, ImVec2(128, 128));
ImGui::SetItemKeyOwner(ImGuiKey_MouseWheelY);
ImGui::End();
The text was updated successfully, but these errors were encountered:
Version/Branch of Dear ImGui:
Version 1.91.8, Branch: master
Back-ends:
imgui_impl_win32.cpp + imgui_impl_dx9.cpp
Compiler, OS:
WIndows 11 + MSVC 2022
Full config/build information:
Details:
I haven't tested other keys, but If you use
ImGui::SetItemKeyOwner(ImGuiKey_MouseWheelY)
on Images, it doesn't work as you can still scroll on the window.I needed to do this because in my project I'm writing a 2D animation editor where you can preview the image and zoom in/out, but I can't have the window scroll along with the image.
The only thing I've tried was calling
SetItemKeyOwner
beforeImage
, but that of course did not fix the problem.Screenshots/Video:
Minimal, Complete and Verifiable Example code:
The text was updated successfully, but these errors were encountered: