Exemplo n.º 1
0
            // Handle drag and drop to move options inside a group or into another group.
            private static void Source(IModGroup group, int groupIdx, int optionIdx)
            {
                using var source = ImRaii.DragDropSource();
                if (!source)
                {
                    return;
                }

                if (ImGui.SetDragDropPayload(DragDropLabel, IntPtr.Zero, 0))
                {
                    _dragDropGroupIdx  = groupIdx;
                    _dragDropOptionIdx = optionIdx;
                }

                ImGui.TextUnformatted($"Dragging option {group[ optionIdx ].Name} from group {group.Name}...");
            }