void Display() { if (PageData.isShowYokaiDetail) { _library.SetActive(false); _detail.SetActive(true); _backLibrary.SetActive(true); if (ApplicationData.YokaiData.Exists(s => s.id == UserData.GetUserInfo().yokais.Last().yokai_id)) { var d = ApplicationData.YokaiData.Where(s => s.id == UserData.GetUserInfo().yokais.Last().yokai_id).First(); _image.GetComponent <Image>().sprite = d.image; if (d.kana != "" && ApplicationData.SelectedLanguage == LanguageType.Japanese) { _name.GetComponent <Text>().text = d.localNames[(int)ApplicationData.SelectedLanguage].text; _kana.GetComponent <Text>().text = d.kana; _name.GetComponent <Text>().fontSize = 90; } else { if (ThaiFontAdjuster.IsThaiString(d.localNames[(int)ApplicationData.SelectedLanguage].text.ToString())) { _name.GetComponent <Text>().text = ThaiFontAdjuster.Adjust(d.localNames[(int)ApplicationData.SelectedLanguage].text.ToString()); _kana.GetComponent <Text>().text = ""; _name.GetComponent <Text>().font = ApplicationData.GetFont(4); _name.GetComponent <Text>().fontSize = 110; } else { _name.GetComponent <Text>().text = d.localNames[(int)ApplicationData.SelectedLanguage].text; _kana.GetComponent <Text>().text = ""; _name.GetComponent <Text>().fontSize = 90; } } _description.GetComponent <Text>().text = d.localContents[(int)ApplicationData.SelectedLanguage].text; if (ApplicationData.SelectedLanguage == LanguageType.Thai) { _description.GetComponent <Text>().font = ApplicationData.GetFont(4); _description.GetComponent <Text>().fontSize = 62; _description.GetComponent <Text>().text = ThaiFontAdjuster.Adjust(d.localContents[(int)ApplicationData.SelectedLanguage].text); } else { _description.GetComponent <Text>().font = ApplicationData.GetFont(2); _description.GetComponent <Text>().fontSize = 42; } } } PageData.Initialize(); }
void OnEnable() { switch (Application.systemLanguage.ToString()) { case "Japanese": SelectJapanese(); break; case "ChineseTraditional": SelectChinese1(); break; case "ChineseSimplified": SelectChinese2(); break; case "Thai": SelectThai(); break; default: SelectEnglish(); break; } imgLogo.sprite = ApplicationData.GetLogoImage(ApplicationData.SelectedLanguage).img; PageData.Initialize(); if (ApplicationLogic.IsShowTermLimitedYokai()) { dialog.SetActive(true); txtTerm.text = ApplicationData.GetLocaleText(LocaleType.TermLimitedYokai); txtTerm.lineSpacing = ApplicationData.SetLineSpacing(LocaleType.TermLimitedYokai); txtTerm.fontSize = ApplicationData.SetFontSize(LocaleType.TermLimitedYokai); } else { dialog.SetActive(false); } txtSelectLanguage.text = ApplicationData.GetLocaleText(LocaleType.SelectLanguage); txtShowApp.text = ApplicationData.GetLocaleText(LocaleType.ButtonOpenEsashiApp); txtCaution.text = ApplicationData.GetLocaleText(LocaleType.ButtonOpenCautionDialog); }