Exemple #1
0
        void HandleLayerAddBlackMaskBehind()
        {
            object targetPanel             = null;
            int    targetPanelSortingOrder = 0;

            for (int i = EnumUtil.GetCount <EUILayerName>() - 1; i >= 0; i--)
            {
                EUILayerName uiLayerName = (EUILayerName)i;
                var          uiLayer     = Client.instance.uiManager.uiLayerManager.GetUILayer(uiLayerName);
                if (uiLayer.graphicComponent.IsShow() && uiLayer.uiLayerConfig.uiLayerRule.IsAddBlackMaskBehind())
                {
                    for (int j = uiLayer.panelList.Count - 1; j >= 0; j--)
                    {
                        var panel = uiLayer.panelList[j];
                        if (panel is UIPanel uiPanel)
                        {
                            if (!uiPanel.isHideBlackMaskBehind)
                            {
                                targetPanel             = uiPanel;
                                targetPanelSortingOrder = uiPanel.sortingOrder;
                                break;
                            }
                        }
                        else
                        {
                            LuaTable panelLuaTable = (LuaTable)panel;
                            if (!panelLuaTable.InvokeFunc <bool>("IsHideBlackMaskBehind"))
                            {
                                targetPanel             = panel;
                                targetPanelSortingOrder = panelLuaTable.InvokeFunc <int>("GetSortingOrder");
                                break;
                            }
                        }
                    }
                }
            }

            if (targetPanel == null)
            {
                this.Broadcast(null, UIEventNameConst.HideUIBlackMask);
            }
            else
            {
                this.Broadcast(null, UIEventNameConst.ShowUIBlackMask, targetPanelSortingOrder, targetPanel);
            }
        }
Exemple #2
0
 public UILayerConfig(EUILayerName name, int order_in_layer, UILayerRule uiLayerRule)
 {
     this.name         = name;
     this.orderInLayer = order_in_layer;
     this.uiLayerRule  = uiLayerRule;
 }
Exemple #3
0
 public UILayer GetUILayer(EUILayerName eUILayerName)
 {
     return(uiLayerDict[eUILayerName]);
 }
Exemple #4
0
 void SetIsHideUILayer(EUILayerName eUILayerName, bool isHide)
 {
     GetUILayer(eUILayerName).graphicComponent.SetIsShow(!isHide);
 }
Exemple #5
0
        //供lua端调用,不要删除
        public UILayer GetUILayer(string uiLayerName)
        {
            EUILayerName eUILayerName = uiLayerName.ToEnum <EUILayerName>();

            return(GetUILayer(eUILayerName));
        }