Ejemplo n.º 1
0
        private void StartDrag(AC.Menu _menu)
        {
            menuToDrag = _menu;

            if (dragType == DragElementType.SingleElement)
            {
                if (elementName != "")
                {
                    MenuElement element = PlayerMenus.GetElementWithName (_menu.title, elementName);
                    if (element == null)
                    {
                        ACDebug.LogWarning ("Cannot drag " + elementName + " as it cannot be found on " + _menu.title);
                    }
                    else if (element.positionType == AC_PositionType2.Aligned)
                    {
                        ACDebug.LogWarning ("Cannot drag " + elementName + " as its Position is set to Aligned");
                    }
                    else if (_menu.sizeType == AC_SizeType.Automatic)
                    {
                        ACDebug.LogWarning ("Cannot drag " + elementName + " as its parent Menu's Size is set to Automatic");
                    }
                    else
                    {
                        elementToDrag = element;
                        dragStartPosition = elementToDrag.GetDragStart ();
                    }
                }
            }
            else
            {
                dragStartPosition = _menu.GetDragStart ();
            }
        }