public void Show(Sprite sprite, string title) { gameObject.SetActive(true); _titBig.gameObject.SetActive(true); _imgBig.gameObject.SetActive(true); _txt.gameObject.SetActive(false); _tit.gameObject.SetActive(false); _img.gameObject.SetActive(false); StartCoroutine(Utility.FadeCoroutineUI(_grp, 0.0f, 1.0f, 0.65f, true)); _imgBig.sprite = sprite; Vector2 nSizeDelta = _defSizeDelta; Vector2 nBounds = sprite.bounds.extents; nBounds.Normalize(); nSizeDelta.x *= nBounds.x; nSizeDelta.y *= nBounds.y; _imgBig.rectTransform.sizeDelta = nSizeDelta; _titBig.text = title; _txt.text = ""; LangManager.UpdateSingleText(_pressToClose); LangManager.UpdateSingleText(_titBig); LanguageManager.Language _lang = (LanguageManager.Language)PlayerPrefs.GetInt("PP_LANGUAGE", 0); LangManager.ChangeLanguage(_lang); }
public WidControlFEBasicStore() { SC_ItemList = null; SC_DeliveryAddress = null; SC_UserAddress = null; SC_ControlMode = ControlMode.SingleLevel; SC_PriceFormatString = ctDEFPriceFormatString; SC_CurrencySymbol = ctDEFCurrencySymbol; SC_InputLimit = ctDEFInputLimit; SC_ConfirmationTitle = ctDEFConfirmationTitle; SC_TotalQuantityText = ctDEFTotalQuantityText; SC_TotalPriceText = ctDEFTotalPriceText; SC_DeliveryTitle = ctDEFDeliveryTitle; SC_NameLabel = ctDEFNameLabel; SC_ContactNoLabel = ctDEFContactNoLabel; SC_AddressLabel = ctDEFAddressLabel; SC_OrderRemarkTitle = ctDEFOrderRemarkTitle; SC_OrderButtonText = ctDEFOrderButtonText; SC_BackButtonText = ctDEFBackButtonText; SC_CurrencyPosition = CurrencyPosition.Prefix; clLanguage = LanguageManager.Language.English; }
public WidControlBEItemList() { SC_ItemList = null; SC_ControlMode = ControlMode.Item; SC_CategoryTitle = ctDEFCategoryTitle; SC_TitleVisible = false; SC_DescriptionVisible = false; SC_PriceVisible = true; SC_PriceFormatString = ctDEFPriceFormatString; SC_CurrencySymbol = ctDEFCurrencySymbol; SC_ButtonText = ctDEFButtonText; SC_CurrencyPosition = CurrencyPositon.Prefix; clLanguage = LanguageManager.Language.English; }
private void StartGUIPickables() { List <PickableObject> pickablesOnLevel = GameManager.Instance.CurrentRoom.PickableObjects; CanvasGroup[] fields = PanelPickableList.GetComponentsInChildren <CanvasGroup>(true); List <Text> allTexts = new List <Text>(); int i = 1; // because first canvas group is panel root object foreach (PickableObject obj in pickablesOnLevel) { fields[i].gameObject.SetActive(true); Button button = fields[i].GetComponentInChildren <Button>(); Text text = fields[i].GetComponentInChildren <Text>(); text.text = obj.Name; _baseColor = text.color; // Assigning list element to pickable object here obj.AssociatedListElement = fields[i]; button.enabled = true; if (GameManager.Instance.CurrentRoom.PickablePickedObjectIDs.Contains(obj.ID)) { ChangeTextPickedStatus(text, button, true); } else { ChangeTextPickedStatus(text, button, false); } _allPickablesDict.Add(obj, text); allTexts.Add(text); ++i; } // shutting down remaining fields for (int j = i; j < fields.Length; ++j) { fields[j].gameObject.SetActive(false); fields[j].GetComponentInChildren <Text>().text = ""; fields[j].GetComponentInChildren <Button>().enabled = false; } LangManager.UpdateIndexToText(allTexts); LanguageManager.Language _lang = (LanguageManager.Language)PlayerPrefs.GetInt("PP_LANGUAGE", 0); LangManager.ChangeLanguage(_lang); }
public void SelectLanguage(LanguageManager.Language language) { languageManager.LoadLanguage(language); SetUITexts(); }
public void setLanguage(LanguageManager.Language lang) { PlayerPrefs.SetInt(PREFS_LANG, (int)lang); }