void UISort() { resButtons = new List <Button>(); LoadingUI.Hide(); //loadingIndicatorAnimator.SetBool("Enabled", false); // used for loading animator for (int i = 0; i < resList.Count; i++) { GameObject newButton = Instantiate(resButtonPrefab, buttonsParent); FoodListButton f = newButton.GetComponent <FoodListButton>(); f.UItext.text = resList[i]; f.buttonIndex = i; resButtons.Add(newButton.GetComponent <Button>()); } }
private void Awake() { ins = this; resInfoText = resInfosUI; resNormalCB = resButtonPrefab.GetComponent <Button>().colors; resHCB = resNormalCB; resHCB.normalColor = Generic.gData.resHighlighted; resHCB.highlightedColor = Generic.gData.resHighlighted; InputFoodButton = InputFoodButtonIns; FoodInputFieldStatic = FoodInputField; EnterFoodListButtonAnimatorStatic = EnterFoodListButtonAnimator; EnterFoodListButtonStatic = EnterFoodListButton; }