mirror of
https://github.com/ocornut/imgui.git
synced 2026-10-29 07:54:40 +00:00
Drag & drop : Possibility to show all possible drop locations ? #9541
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#9541
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Version/Branch of Dear ImGui:
Version 1.92.9b, Branch: docking
Back-ends:
imgui_impl_GLFW.cpp + imgui_impl_Vulkan.cpp
Compiler, OS:
Windows 11 + MSVC 2022
Full config/build information:
No response
Details:
My Question:
How can I show all possible drop locations once a drag is started ?
I would like to display all the yellow rectangles (maybe dashed or with thiner borders) of widgets that would accept the current payload.
To give some context, in my application there are different drag sources, and each source has a few possible destinations.
In the drag tooltip I tell where the user can drop, but it would be much more intuitive if the destinations were visible
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
This would need a rework/redesign of
BeginDragDropTarget()andAcceptDragDropPayload().The "problem" is it means that all BeginDragDropTarget() -> AcceptDragDropPayload() blocks would run during the drag, so enabling per source / or source payload seems intuitively preferable. The new model would need careful design to be optimal, general approach being to always try order checks by ~((probability of early out) / (test cost))
BeginDragDropTarget()early out on 99% items with the hovered check.BeginDragDropTarget()would check that new state + item visibility, and therefore let most requests pass.BeginDragDropTarget()to the first passingAcceptDragDropPayload().It would require a bit of work but is doable.
This would need a rework/redesign of
BeginDragDropTarget()andAcceptDragDropPayload().The "problem" is it means that all BeginDragDropTarget() -> AcceptDragDropPayload() blocks would run during the drag, so enabling per source / or source payload seems intuitively preferable. The new model would need careful design to be optimal, general approach being to always try order checks by ~((probability of early out) / (test cost))
BeginDragDropTarget()early out on 99% items with the hovered check.BeginDragDropTarget()would check that new state + item visibility, and therefore let most requests pass.BeginDragDropTarget()to the first passingAcceptDragDropPayload().It would require a bit of work but is doable.
Hi,
Thanks for your feedback
ImGuiDragDropFlags_SourceShowAllDropLocationsto enable this, so the impact is opt-in.