少年修仙传客户端代码仓库
client_Wu Xijin
2018-08-20 1c4c5c5cb829334303bff98837a69a9653dca714
System/Role/RoleAttrWin.cs
@@ -14,12 +14,9 @@
        [SerializeField] Image baseImg;
        [SerializeField] Image specialImg;
        [SerializeField] Image addImg;
        [SerializeField] Button addBtn;
        [SerializeField] Text m_BaseTxt;
        [SerializeField] Text m_SpecialTxt;
        [SerializeField] Text m_AddTxt;
        private readonly Color selectTxtCol = new Color32(52, 7, 1, 255);
        private readonly Color unSelectTxtCol = new Color32(125, 91, 52, 255);
@@ -39,31 +36,15 @@
        [SerializeField] Text descText;
        private void OnAddBtn()
        {
            if (attrShowType == 3) return;
            attrShowType = 3;
            addImg.SetSprite("2LVSelectTab_b");
            specialImg.SetSprite("2LVUnSelectTab_b");
            baseImg.SetSprite("2LVUnSelectTab_b");
            m_BaseTxt.color = unSelectTxtCol;
            m_SpecialTxt.color = unSelectTxtCol;
            m_AddTxt.color = selectTxtCol;
            OnRefreshScroll();
        }
        private void OnSpecialBtn()
        {
            if (attrShowType == 2) return;
            attrShowType = 2;
            addImg.SetSprite("2LVUnSelectTab_b");
            specialImg.SetSprite("2LVSelectTab_b");
            baseImg.SetSprite("2LVUnSelectTab_b");
            m_BaseTxt.color = unSelectTxtCol;
            m_SpecialTxt.color = selectTxtCol;
            m_AddTxt.color = unSelectTxtCol;
            OnRefreshScroll();
        }
@@ -73,12 +54,10 @@
            if (attrShowType == 1) return;
            attrShowType = 1;
            addImg.SetSprite("2LVUnSelectTab_b");
            specialImg.SetSprite("2LVUnSelectTab_b");
            baseImg.SetSprite("2LVSelectTab_b");
            m_BaseTxt.color = selectTxtCol;
            m_SpecialTxt.color = unSelectTxtCol;
            m_AddTxt.color = unSelectTxtCol;
            OnRefreshScroll();
        }
@@ -173,7 +152,6 @@
        {
            m_Controller.OnRefreshCell += OnRefreshCell;
            m_Controller.OnGetDynamicSize += OnGetDynamicSize;
            addBtn.onClick.AddListener(OnAddBtn);
            specialBtn.onClick.AddListener(OnSpecialBtn);
            baseBtn.onClick.AddListener(OnBaseBtn);
            closeBtn.onClick.AddListener(OnClose);