Feature request: Drag widgets that allow dragging past the edge of the screen
Version/Branch of Dear ImGui:
Any
Back-ends:
Any
Compiler, OS:
Any
Full config/build information:
No response
Details:
It's common for GUIs that have unbounded "drag" widgets for numeric inputs (eg: Blender, Godot, Gimp...) to allow dragging infintely towards either side, without the mouse ever stopping because it has hit the edge of the screen.
It would be good if this could be supported by ImGUI, potentially with a new ImGuiSliderFlags, although the implementation likely would need to be backend-dependent. On SDL, one can use SDL_SetRelativeMouseMode to achieve this.
Screenshots/Video:
Continuous dragging a distance that would be well past the edge of the sceen:
https://github.com/user-attachments/assets/64b88d56-2b22-4456-91b7-e6f246a85bd8
Minimal, Complete and Verifiable Example code:
I have used AI to prototype an implementation, but it's hardcoded to use SDL2: https://github.com/albertvaka/imgui_draggable_widgets
I recorded the above video with this implementation.
Source: ocornut/imgui