Пример #1
0
    private void OnDragEnter(Event e)
    {
        //Debug.Log("OnDragEnter: " + e.Target.GetType().Name);
        Component comp = (Component)e.Target;

        if (null == comp)
        {
            return;
        }

        AudioPlayerMapper.GetDefault().PlaySound("pager_click", new AudioOption(AudioOptionType.Volume, 0.3f));

        // check if drag enter item is child of _pnlDest or _pnlSource itself
        // allow the whole box to be drop target when moving
        if (_pnlDest.ContentContains(comp) || comp == _pnlDest.ContentGroup)
        {
            DragDropManager.AcceptDragDrop((Component)e.Target);
            DragDropManager.ShowFeedback(DragDropManager.Action.Move);
        }
    }