Beispiel #1
0
        public void OnChangedCupIsOnlineDd(int nIndex)
        {
            SSchemeLegendCupTipConfig tipConfig = null;

            if (nIndex == 0)
            {
                tipConfig = LegendCupConfig.Instance.GetCupTipConfig((int)LegendCupTipType.LCTT_OnLine_CupCreate);
            }
            else if (nIndex == 1)
            {
                tipConfig = LegendCupConfig.Instance.GetCupTipConfig((int)LegendCupTipType.LCTT_OffLine_CupCreate);
            }
            if (tipConfig != null)
            {
                SubTitleDes.text = tipConfig.sCupTitle;
                UBB.toHtml(ref tipConfig.sCupContent, UBB_FORMAT_TYPE.UGUI);
                CreateTipContent.text = tipConfig.sCupContent;
            }
        }
Beispiel #2
0
        public override bool Init(IUIWnd wnd)
        {
            base.Init(wnd);

            TitleDes.text         = ULocalizationService.Instance.Get("UIView", "LegendCupCreate", "Title");
            LegendCupNameDes.text = String.Format("{0}:", ULocalizationService.Instance.Get("UIView", "LegendCupCreate", "LegendCupNmae"));
            CupConfigNameDes.text = String.Format("{0}:", ULocalizationService.Instance.Get("UIView", "LegendCupCreate", "CupConfigName"));
            DeadlineDes.text      = String.Format("{0}:", ULocalizationService.Instance.Get("UIView", "LegendCupCreate", "Deadline"));
            PasswordDes.text      = String.Format("{0}:", ULocalizationService.Instance.Get("UIView", "LegendCupCreate", "Password"));
            RegistGoldDes.text    = String.Format("{0}:", ULocalizationService.Instance.Get("UIView", "LegendCupCreate", "RegistGold"));
            ContriBonusDes.text   = String.Format("{0}:", ULocalizationService.Instance.Get("UIView", "LegendCupCreate", "ContriBonus"));
            CupIsOnlineDes.text   = String.Format("{0}:", ULocalizationService.Instance.Get("UIView", "LegendCupCreate", "CupIsOnline"));
            CreateGoldDes.text    = String.Format("{0}:", ULocalizationService.Instance.Get("UIView", "LegendCupCreate", "CreateGold"));

            LegendCupNameIF.placeholder.GetComponent <Text>().text = "";
            PassWordIF.placeholder.GetComponent <Text>().text      = "";
            RegistGoldIF.placeholder.GetComponent <Text>().text    = "0";
            ContriBonusIF.placeholder.GetComponent <Text>().text   = "0";
            CreateGold.text = "0";

            CupIsOnlineDd.onValueChanged.RemoveListener(OnChangedCupIsOnlineDd);
            CupIsOnlineDd.options.Clear();
            CupIsOnlineDd.options.Add(new Dropdown.OptionData(ULocalizationService.Instance.Get("UIView", "LegendCupCreate", "CupIsOnlineOpt1")));
            CupIsOnlineDd.options.Add(new Dropdown.OptionData(ULocalizationService.Instance.Get("UIView", "LegendCupCreate", "CupIsOnlineOpt2")));
            CupIsOnlineDd.captionText.text = CupIsOnlineDd.options.ElementAt(0).text;
            CupIsOnlineDd.onValueChanged.AddListener(OnChangedCupIsOnlineDd);

            SSchemeLegendCupTipConfig tipConfig = LegendCupConfig.Instance.GetCupTipConfig((int)LegendCupTipType.LCTT_OnLine_CupCreate);

            if (tipConfig != null)
            {
                SubTitleDes.text = tipConfig.sCupTitle;
                UBB.toHtml(ref tipConfig.sCupContent, UBB_FORMAT_TYPE.UGUI);
                CreateTipContent.text = tipConfig.sCupContent;
            }

            ConfirmBtnDes.text = ULocalizationService.Instance.Get("UIView", "LegendCupCreate", "ConfirmBtn");
            CancelBtnDes.text  = ULocalizationService.Instance.Get("UIView", "LegendCupCreate", "CancelBtn");

            return(true);
        }
Beispiel #3
0
        public void OnShowTipWnd(int nTipType)
        {
            TipTitle.text   = "";
            TipContent.text = "";

            if (nTipType <= (int)LegendCupTipType.LCTT_None || nTipType >= (int)LegendCupTipType.LCTT_MAX)
            {
                return;
            }

            SSchemeLegendCupTipConfig tipConfig = LegendCupConfig.Instance.GetCupTipConfig(nTipType);

            if (tipConfig == null)
            {
                return;
            }

            TipTitle.text = tipConfig.sCupTitle;
            if (!tipConfig.sCupContent.Equals(string.Empty))
            {
                UBB.toHtml(ref tipConfig.sCupContent, UBB_FORMAT_TYPE.UGUI);
                TipContent.text = tipConfig.sCupContent;
            }
        }