MCPcopy Create free account
hub / github.com/Nelarius/imnodes / IsLinkDropped

Function IsLinkDropped

imnodes.cpp:2885–2904  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2883}
2884
2885bool IsLinkDropped(int* const started_at_id, const bool including_detached_links)
2886{
2887 // Call this function after EndNodeEditor()!
2888 assert(GImNodes->CurrentScope == ImNodesScope_None);
2889
2890 const ImNodesEditorContext& editor = EditorContextGet();
2891
2892 const bool link_dropped =
2893 (GImNodes->ImNodesUIState & ImNodesUIState_LinkDropped) != 0 &&
2894 (including_detached_links ||
2895 editor.ClickInteraction.LinkCreation.Type != ImNodesLinkCreationType_FromDetach);
2896
2897 if (link_dropped && started_at_id)
2898 {
2899 const int pin_idx = editor.ClickInteraction.LinkCreation.StartPinIdx;
2900 *started_at_id = editor.Pins.Pool[pin_idx].Id;
2901 }
2902
2903 return link_dropped;
2904}
2905
2906bool IsLinkCreated(
2907 int* const started_at_pin_id,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected