Beispiel #1
0
    private void SetSelectedRank(object param)
    {
        if (param == null)
        {
            mToggleGrade.value = true;
            return;
        }

        RankSelect rank = (RankSelect)param;

        switch (rank)
        {
        case RankSelect.Rank_Grade:
            mToggleGrade.value = true;
            break;

        case RankSelect.Rank_Level:
            mToggleLevel.value = true;
            break;

        case RankSelect.Rank_Rank:
            mToggleRank.value = true;
            break;

        case RankSelect.Rank_Arena:
            mToggleArena.value = true;
            break;

        default:
            mToggleGrade.value = true;
            break;
        }
    }
Beispiel #2
0
    private void onToggleChanged()
    {
        RankSelect sel = RankSelect.Rank_Invaild;

        mToggleGradeLB.applyGradient = mToggleGrade.value;
        mToggleLevelLB.applyGradient = mToggleLevel.value;
        mToggleRankLB.applyGradient  = mToggleRank.value;
        mToggleArenaLB.applyGradient = mToggleArena.value;

        if (mToggleGrade.value)
        {
            sel = RankSelect.Rank_Grade;
        }
        if (mToggleLevel.value)
        {
            sel = RankSelect.Rank_Level;
        }
        if (mToggleRank.value)
        {
            sel = RankSelect.Rank_Rank;
        }
        if (mToggleArena.value)
        {
            sel = RankSelect.Rank_Arena;
        }

        if (sel == RankSelect.Rank_Invaild)
        {
            return;
        }
        if (mSelect != sel)
        {
            mSelect = sel;
            UpdateItems();
        }
    }