Ejemplo n.º 1
0
        public void Initialize(Panel panel, PanelDirection direction, PanelResizeHelper helperBefore, PanelResizeHelper helperAfter)
        {
            this.panel = panel;

            this.direction    = direction;
            this.helperBefore = helperBefore;
            this.helperAfter  = helperAfter;
        }
Ejemplo n.º 2
0
        public static void OnPointerEnter(PanelResizeHelper resizeHelper, PointerEventData eventData)
        {
            if (instance == null)
            {
                return;
            }

            instance.activeResizeHelper = resizeHelper;
            instance.activeEventData    = eventData;
        }
Ejemplo n.º 3
0
        private PanelResizeHelper GetResizeZone(PanelDirection direction)
        {
            PanelResizeHelper resizeZone = resizeZones[(int)direction];

            if (resizeZone != null)
            {
                return(resizeZone);
            }

            resizeZone = new GameObject("ResizeZone" + direction, typeof(RectTransform)).AddComponent <PanelResizeHelper>();
            resizeZone.RectTransform.SetParent(resizeZonesParent, false);
            resizeZone.gameObject.AddComponent <NonDrawingGraphic>();

            resizeZones[(int)direction] = resizeZone;

            return(resizeZone);
        }
Ejemplo n.º 4
0
        public static void OnPointerExit(PanelResizeHelper resizeHelper)
        {
            if (instance == null)
            {
                return;
            }

            if (instance.activeResizeHelper == resizeHelper)
            {
                instance.activeResizeHelper = null;
                instance.activeEventData    = null;

                if (!instance.isResizing)
                {
                    SetDefaultCursor();
                }
            }
        }