| 2883 | } |
| 2884 | |
| 2885 | bool 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 | |
| 2906 | bool IsLinkCreated( |
| 2907 | int* const started_at_pin_id, |
nothing calls this directly
no outgoing calls
no test coverage detected