Beispiel #1
0
 void TryToGetReferences()
 {
     if (topControl == null) topControl = GetComponentInChildren<LayoutTopControl>();
     if (panel == null) panel = gameObject.GetComponent<LayoutPanel>();
     if (foldController == null) foldController = gameObject.GetComponent<LayoutFoldController>();
     if (foldController != null) foldButton = foldController.foldButton;
     if (layoutBorderHide == null) layoutBorderHide = GetComponent<LayoutBorderHide>();
 }
 void OnEnable()
 {
     redraw += Redraw;
     Redraw();
     GetTargets();
     foldController = GetComponentInParent <LayoutFoldController>();
     if (foldController != null)
     {
         foldController.onFold += OnFoldToggle;
         OnFoldToggle(foldController.isFolded);
     }
 }
Beispiel #3
0
        void OnEnable()
        {
            LayoutPanel.onBorderSizeChange += SetSize;
            SetSize();
            GetTargets();
            foldController = GetComponentInParent <LayoutFoldController>();
            if (foldController != null)
            {
                foldController.onFold += OnFoldToggle;
                OnFoldToggle(foldController.isFolded);
            }
            var vh = GetComponentInParent <LayoutBorderHide>();

            if (vh != null)
            {
                image.color = vh.borderColor;
            }
        }