public void SetLabel(AXsollaShopItem.AdType type, string text) { StyleManager.BaseColor newColor = StyleManager.BaseColor.b_normal; switch (type) { case XsollaShopItem.AdType.NONE: newColor = StyleManager.BaseColor.b_normal; break; case XsollaShopItem.AdType.SPECIAL_OFFER: newColor = StyleManager.BaseColor.b_special_offer; break; case XsollaShopItem.AdType.BEST_DEAL: newColor = StyleManager.BaseColor.b_best_deal; break; case XsollaShopItem.AdType.RECCOMENDED: newColor = StyleManager.BaseColor.b_recomended; break; } colorController.ChangeColor(0, newColor); colorController.ChangeColor(2, newColor); if (type == XsollaShopItem.AdType.NONE) { ItemLable.SetActive(false); } else { ItemLableText.text = text; ItemLable.SetActive(true); } }
public void ChangeColor(int elemNo, StyleManager.BaseColor color) { itemsToColor [elemNo].color = color; foreach (Elem e in itemsToColor) { if (e.whatToColor != null) { e.whatToColor.color = StyleManager.Instance.GetColor(e.color); } } }