Ejemplo n.º 1
0
        protected override DragAndDropVisualMode HandleDragAndDrop(DragAndDropArgs args)
        {
            var render = AssetTreeManager.mIns.GetGuiRender(EditorContexts.mIns.Mode);

            if (render != null)
            {
                AssetDragAndDropArgs copyArgs = new AssetDragAndDropArgs();
                copyArgs.dragAndDropPosition = (AssetDragAndDropArgs.DragAndDropPosition)((int)args.dragAndDropPosition);
                copyArgs.insertAtIndex       = args.insertAtIndex;
                copyArgs.parentItem          = args.parentItem;
                copyArgs.performDrop         = args.performDrop;
                DragAndDropVisualMode result = DragAndDropVisualMode.Move;
                foreach (var subrender in render)
                {
                    if (subrender.TypeMode == _viewMode)
                    {
                        IGuiTree treeRender = subrender as IGuiTree;
                        if (treeRender != null)
                        {
                            treeRender.Drag(ref copyArgs, ref result);
                        }
                    }
                }
                return(result);
            }

            return(base.HandleDragAndDrop(args));
        }