296 子 【常规】坊市系统 / 【常规】坊市系统-客户端 - 优化适配,增加入口显隐功能依赖
| | |
| | | public static float blockRatio; |
| | | |
| | | public static Dictionary<int, string> itemIconDict { get; private set; } |
| | | public static int mainRightFuncOpenFuncID { get; private set; } |
| | | |
| | | public static void Init() |
| | | { |
| | | try |
| | | { |
| | | MoneyDisplayModel = ConfigParse.ParseIntDict(GetInputString("MoneyDisplayModel", 1)); |
| | | |
| | | |
| | | |
| | | |
| | | var config = FuncConfigConfig.Get("PutInItemPack"); |
| | | JsonData itemPutInData = JsonMapper.ToObject(config.Numerical1); |
| | | itemPutInPackDict = new Dictionary<int, List<int>>(); |
| | |
| | | itemIconDict.Add(itemType, icon); |
| | | } |
| | | |
| | | |
| | | config = FuncConfigConfig.Get("MainRightFunc"); |
| | | mainRightFuncOpenFuncID = int.Parse(config.Numerical1); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | DisplayLevel(); |
| | | DisplayRestState(); |
| | | |
| | | funcColBtn.SetActive(FuncOpen.Instance.IsFuncOpen(GeneralDefine.mainRightFuncOpenFuncID)); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | |
| | | { |
| | | DisplayFirstChargeBtn(); |
| | | } |
| | | else if (funcId == GeneralDefine.mainRightFuncOpenFuncID) |
| | | { |
| | | funcColBtn.SetActive(FuncOpen.Instance.IsFuncOpen(GeneralDefine.mainRightFuncOpenFuncID)); |
| | | } |
| | | } |
| | | |
| | | private void OnUpdateFirstChargeInfo() |
| | |
| | | UIManager.Instance.OnCloseWindow += OnCloseWindow; |
| | | } |
| | | |
| | | void ShowBtns() |
| | | { |
| | | storeBtn.SetActive(FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Store)); |
| | | } |
| | | |
| | | |
| | | //显隐功能栏 |
| | | public void ShowFuncCol(bool _isShow) |
| | | { |
| | | isShow = _isShow; |
| | | funcCol.DOLocalMove(isShow ? showPoint.localPosition : hidePoint.localPosition, 0.3f); |
| | | if (isShow) |
| | | { |
| | | ShowBtns(); |
| | | } |
| | | } |
| | | |
| | | void OnCloseWindow(UIBase win) |
| | |
| | | { |
| | | // 创建 |
| | | var instance = UIUtility.CreateWidget("OneLevelWin", "BottomTabs"); |
| | | instance.transform.SetParentEx(_rectTransform, Vector3.zero, Quaternion.identity, Vector3.one); |
| | | instance.transform.SetParent(_rectTransform, false); |
| | | closeBtn = _rectTransform.GetComponent<Button>("BottomTabs/bg/backbtn"); |
| | | tabBtn = _rectTransform.GetComponent<GroupButtonEx>("BottomTabs/bg/btns/funcbtn"); |
| | | var btnParent = _rectTransform.GetComponent<RectTransform>("BottomTabs/bg/btns"); |