SinglePlayer.UI.LevelRateHandler.UpdateAllPanelItems C# (CSharp) Method

UpdateAllPanelItems() public method

public UpdateAllPanelItems ( string selectedToggle ) : void
selectedToggle string
return void
        public void UpdateAllPanelItems(string selectedToggle)
        {
            foreach (Category cat in Category.Values) {
                if (cat.name.Equals(selectedToggle)) {
                    List<LevelRate> tempList = this.allAttributes[cat.value];
                    if (tempList != null) {
                        for (int i = 0; i < tempList.Count; i++) {
                            //Panel items
                            Transform child = this.transform.GetChild(i);
                            PanelItem item = child.GetComponent<PanelItem>();
                            if (item != null) {
                                LevelRate levelRate = tempList[i];
                                item.levelText.text = "Level " + levelRate.level.ToString();
                                item.rateText.text = levelRate.rate.ToString();
                                if (levelRate.isIncreasing > 0) {
                                    item.isIncreasingText.text = "++";
                                }
                                else if (levelRate.isIncreasing == 0) {
                                    item.isIncreasingText.text = "==";
                                }
                                else if (levelRate.isIncreasing < 0) {
                                    item.isIncreasingText.text = "--";
                                }
                                else {
                                    item.isIncreasingText.text = "N/A";
                                }
                            }
                        }
                        Debug.Log("Updated all panel items");
                    }
                    break;
                }
            }
        }