Nelarius / imnodes

A small, dependency-free node editor for dear imgui
MIT License
1.97k stars 241 forks source link

Drag and Drop interaction with Grid #133

Open tianyu2 opened 2 years ago

tianyu2 commented 2 years ago

Hi i have a question if i want to drag and a texture into the node editor and create an node for it (like unreal engine's material editor) where should I put my imgui drag and drop func ? because when I try to put inside the Imgui::begin its not working .

Green-Sky commented 2 years ago

Make sure you understand ImGui drag n drop, before applying it to ImNodes

tianyu2 commented 2 years ago

Make sure you understand ImGui drag n drop, before applying it to ImNodes

Thank you for your reply am sorry because I am skill kinda newbie, from all these imgui stuff from what I understand now imgui drag and drop takes in the id of whatever the source is for the target and i have been doing my drag and drop base on that logic,but when i try to put it inside
ImNodes::EditorContextSet(editor.context); ImNodes::BeginNodeEditor(); (DRAG AND DROP CODE)

it did not trigger so I am really confused, if you do not mind can I waste a bit of your time can you explain to me? Thank you!