static public void DrawUI() { ResetRootPivot(); ClearShopInterfaces(); CalculateVerticalOffset(); DrawShading(); DrawBlueButtons(); DrawPoints(); DrawShop(); DrawBlackButtons(); DrawInstructions(); DrawModName(); if (Data.mode == DataEarntConsumable.mode) { UIDrawerEarntConsumable.DrawUI(); } else if (Data.mode == DataEarntPersistent.mode) { UIDrawerEarntPersistent.DrawUI(); } else if (Data.mode == DataFree.mode) { UIDrawerFree.DrawUI(); } else if (Data.mode == DataRandom.mode) { UIDrawerRandom.DrawUI(); } Refresh(); }
static public void Refresh() { for (int modeIndex = 0; modeIndex < Data.modeCount; modeIndex++) { foreach (Image image in modeImages[modeIndex]) { image.gameObject.SetActive(modeIndex == Data.mode); } } for (int profileIndex = 0; profileIndex < profileImages.Count; profileIndex++) { foreach (Image image in profileImages[profileIndex]) { image.gameObject.SetActive(profileIndex == Data.profile[Data.mode]); } } if (Data.modEnabled) { //statusTexts[0].faceColor = UIConfig.enabledColor; statusTexts[0].color = UIConfig.enabledColor; statusTexts[0].text = "Enabled"; } else { //statusTexts[0].faceColor = UIConfig.disabledColor; statusTexts[0].color = UIConfig.disabledColor; statusTexts[0].text = "Disabled"; } if (Data.mode != DataRandom.mode) { multiplierText.text = "X " + Data.buyMultiplier.ToString(); } if (Data.mode == DataEarntConsumable.mode) { UIDrawerEarntConsumable.Refresh(); } else if (Data.mode == DataEarntPersistent.mode) { UIDrawerEarntPersistent.Refresh(); } else if (Data.mode == DataFree.mode) { UIDrawerFree.Refresh(); } else if (Data.mode == DataRandom.mode) { UIDrawerRandom.Refresh(); } }