public static ScrollLabel ScrollLabel(string name, string str, bool multiLine, float maxWidth, float height, float fontSize, SpriteText.Font_Effect fontEffect, SpriteText.Anchor_Pos anchor, string fontColor)
        {
            GameObject  gameObject  = new GameObject(name);
            ScrollLabel scrollLabel = gameObject.AddComponent <ScrollLabel>();

            scrollLabel.gameObject.layer = GUICamera.UILayer;
            scrollLabel.viewableArea     = new Vector2(maxWidth, height);
            scrollLabel.alignment        = UIScrollList.ALIGNMENT.LEFT_TOP;
            scrollLabel.orientation      = UIScrollList.ORIENTATION.VERTICAL;
            scrollLabel.AnchorPos        = anchor;
            scrollLabel.ScrollListTo(0f);
            if (anchor == SpriteText.Anchor_Pos.Upper_Left || (anchor == SpriteText.Anchor_Pos.Middle_Left | anchor == SpriteText.Anchor_Pos.Lower_Left))
            {
                scrollLabel.AlignmentType = SpriteText.Alignment_Type.Left;
            }
            else if (anchor == SpriteText.Anchor_Pos.Upper_Center || (anchor == SpriteText.Anchor_Pos.Middle_Center | anchor == SpriteText.Anchor_Pos.Lower_Center))
            {
                scrollLabel.AlignmentType = SpriteText.Alignment_Type.Center;
            }
            if (anchor == SpriteText.Anchor_Pos.Upper_Right || anchor == SpriteText.Anchor_Pos.Middle_Right || anchor == SpriteText.Anchor_Pos.Lower_Right)
            {
                scrollLabel.AlignmentType = SpriteText.Alignment_Type.Right;
            }
            scrollLabel.FontSize    = (int)fontSize;
            scrollLabel.touchScroll = true;
            scrollLabel.CreateBoxCollider();
            scrollLabel.ColorText  = fontColor;
            scrollLabel.FontEffect = fontEffect;
            scrollLabel.SetScrollLabel(str);
            return(scrollLabel);
        }
Ejemplo n.º 2
0
 public override void SetComponent()
 {
     this.SkillTargetIcon     = (base.GetControl("DrawTexture_skillicon") as DrawTexture);
     this.SkillTargetName     = (base.GetControl("Label_skillname") as Label);
     this.SkillTargetLevel    = (base.GetControl("Label_skill_level") as Label);
     this.SkillCurrentLevel   = (base.GetControl("Label_t_level01") as Label);
     this.SkillCurrentExplain = (base.GetControl("ScrollLabel_Explanation01") as ScrollLabel);
     this.SkillNextLevel      = (base.GetControl("Label_t_level02") as Label);
     this.SkillNextExplain    = (base.GetControl("ScrollLabel_Explanation02") as ScrollLabel);
     this.SkillAngerlypoint   = (base.GetControl("Label_skill_angerlypoint") as Label);
     this.MyMoney             = (base.GetControl("Label_gold_num") as Label);
     this.SkillNeedMoney      = (base.GetControl("Label_Cost_num") as Label);
     this.SkillUpdateButton   = (base.GetControl("Button_skillup") as Button);
     this.SkillUpdateButton.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnClickSkillUpdate));
     this.SkillMaxNeedMoney    = (base.GetControl("Label_cost_maxskill") as Label);
     this.SkillMaxUpdateButton = (base.GetControl("Button_Max_skillup") as Button);
     this.SkillMaxUpdateButton.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnClickMaxSkillUpdate));
     this.dtSkillMoneyIcon    = (base.GetControl("DrawTexture_MoneyIconM_C") as DrawTexture);
     this.dtMaxSkillMoneyIcon = (base.GetControl("DrawTexture_max_MoneyIconM_C") as DrawTexture);
     this.m_btClose           = (base.GetControl("Button_Exit") as Button);
     this.m_btClose.AddValueChangedDelegate(new EZValueChangedDelegate(this.CloseForm));
     this.m_lbDragonHeart_Num     = (base.GetControl("Label_DragonHeart_Num") as Label);
     this.m_btMythSkillUp         = (base.GetControl("Button_MythSkillup") as Button);
     this.m_lbDragonHeartCost_Num = (base.GetControl("Label_DragonHeartCost_num") as Label);
     this.m_dtDragonHeartM_C      = (base.GetControl("DrawTexture_DragonHeartM_C") as DrawTexture);
     this.m_btMythSkillUp.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnClickMythSkillUpdate));
     if (TsPlatform.IsMobile)
     {
         base.SetScreenCenter();
     }
 }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            var label = new ScrollLabel(new CGRect(20, 100, this.View.Frame.Width - 40, 30));

            label.TextColor       = UIColor.Blue;
            label.Font            = UIFont.SystemFontOfSize(14f);
            label.BackgroundColor = UIColor.Yellow;
            label.Text            = "Good Evening Dheeraj, This is a scrolling Label.";
            this.View.AddSubview(label);
            label.BeginScrollWithDirection(ScrollLabelDirection.Left);
        }
Ejemplo n.º 4
0
 public override void SetComponent()
 {
     this.SkillTargetIcon     = (base.GetControl("DrawTexture_skillicon") as DrawTexture);
     this.SkillTargetName     = (base.GetControl("Label_skillname") as Label);
     this.SkillTargetLevel    = (base.GetControl("Label_skill_level") as Label);
     this.SkillCurrentLevel   = (base.GetControl("Label_t_level01") as Label);
     this.SkillCurrentExplain = (base.GetControl("ScrollLabel_Explanation01") as ScrollLabel);
     this.SkillAngerlyPoint   = (base.GetControl("Label_skill_angerlypoint") as Label);
     this.m_btClose           = (base.GetControl("Button_Exit") as Button);
     this.m_btClose.AddValueChangedDelegate(new EZValueChangedDelegate(this.CloseForm));
     if (TsPlatform.IsMobile)
     {
         base.SetScreenCenter();
     }
 }
Ejemplo n.º 5
0
 public override void SetComponent()
 {
     this.m_SolInterfaceTool.m_DrawTextureWeapon     = (base.GetControl("DT_Weapon") as DrawTexture);
     this.m_SolInterfaceTool.m_Label_Character_Name  = (base.GetControl("Label_character_name") as Label);
     this.m_SolInterfaceTool.m_Label_SeasonNum       = (base.GetControl("Label_SeasonNum") as Label);
     this.m_SolInterfaceTool.m_DrawTexture_rank      = (base.GetControl("DrawTexture_rank") as DrawTexture);
     this.m_SolInterfaceTool.m_Label_Rank2           = (base.GetControl("Label_rank2") as Label);
     this.m_SolInterfaceTool.m_DrawTexture_Character = (base.GetControl("DrawTexture_character") as DrawTexture);
     this.m_Button_MovieBtn = (base.GetControl("Button_Movie") as Button);
     this.m_Button_MovieBtn.AddValueChangedDelegate(new EZValueChangedDelegate(this.Click_PreViewHero));
     this.m_Label_Stats_str2 = (base.GetControl("Label_stats_str2") as Label);
     this.m_Label_Stats_dex2 = (base.GetControl("Label_stats_dex2") as Label);
     this.m_Label_Stats_vit2 = (base.GetControl("Label_stats_vit2") as Label);
     this.m_Label_Stats_int2 = (base.GetControl("Label_stats_int2") as Label);
     this.m_SolInterfaceTool.m_DrawTexture_Event = (base.GetControl("DrawTexture_Event") as DrawTexture);
     this.m_SolInterfaceTool.m_Label_EventDate   = (base.GetControl("Label_EventDate") as Label);
     for (int i = 0; i < 2; i++)
     {
         this.m_SolInterfaceTool.m_Lebel_EventHero[i] = (base.GetControl(NrTSingleton <UIDataManager> .Instance.GetString("Label_EventStat", (i + 1).ToString())) as Label);
     }
     this.m_SolInterfaceTool.m_DrawTextureSkillIcon  = (base.GetControl("DT_SkillIcon") as DrawTexture);
     this.m_SolInterfaceTool.m_Label_SkillAnger      = (base.GetControl("Label_Anger") as Label);
     this.m_SolInterfaceTool.m_Label_SkillName       = (base.GetControl("Label_SkillName") as Label);
     this.m_SolInterfaceTool.m_ScrollLabel_SkillInfo = (base.GetControl("ScrollLabel_SkillInfo") as ScrollLabel);
     this.m_ScrollLabel_SolInfo = (base.GetControl("ScrollLabel_SolInfo") as ScrollLabel);
     this.m_DrawTexture_Won     = (base.GetControl("DrawTexture_Won") as DrawTexture);
     if (TsPlatform.IsIPhone || NrGlobalReference.strLangType.Equals("eng"))
     {
         this.m_DrawTexture_Won.SetTexture("Win_I_Dolla");
     }
     else
     {
         this.m_DrawTexture_Won.SetTexture("Win_I_Won");
     }
     this.m_Label_Price  = (base.GetControl("Label_price") as Label);
     this.m_Button_Price = (base.GetControl("Button_Buy") as Button);
     this.m_Button_Price.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnClickedPriceBtn));
     this.m_cMythSkillControl = new ItemMallSolDetailDlg.SolMythSkillSlotControl();
     this.m_cMythSkillControl.SetComponent(this);
     this.m_Button_Price.Visible    = false;
     this.m_Label_Price.Visible     = false;
     this.m_DrawTexture_Won.Visible = false;
     base.Draggable = false;
     base.SetScreenCenter();
     base.ShowBlackBG(0.5f);
 }
Ejemplo n.º 6
0
    public override void SetComponent()
    {
        this.m_SolInterfaceTool.m_Label_Character_Name  = (base.GetControl("Label_character_name") as Label);
        this.m_SolInterfaceTool.m_DrawTexture_Character = (base.GetControl("DrawTexture_character") as DrawTexture);
        this.m_SolInterfaceTool.m_DrawTexture_rank      = (base.GetControl("DrawTexture_rank") as DrawTexture);
        this.m_SolInterfaceTool.m_Label_Rank2           = (base.GetControl("Label_rank2") as Label);
        this.SolSTR         = (base.GetControl("Label_stats_str2") as Label);
        this.SolDEX         = (base.GetControl("Label_stats_dex2") as Label);
        this.SolVIT         = (base.GetControl("Label_stats_vit2") as Label);
        this.SolINT         = (base.GetControl("Label_stats_int2") as Label);
        this.TradeCount     = (base.GetControl("Label_stats_TradeNum2") as Label);
        this.TradeCountName = (base.GetControl("Label_stats_TradeNum") as Label);
        this.TradeCountName.SetText(string.Empty);
        this.SolExplain       = (base.GetControl("ScrollLabel_info") as ScrollLabel);
        this.m_lbSoldierSpec  = (base.GetControl("Label_soldierspec2") as Label);
        this.IntroMovieButton = (base.GetControl("Button_MovieBtn") as Button);
        this.IntroMovieButton.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnIntroMovieButton));
        this.IntroMovieButton.Visible = false;
        this.IntroMoveieText          = (base.GetControl("LB_Movie") as Label);
        this.IntroMoveieText.Visible  = false;
        this.UserPortraitRefresh      = (base.GetControl("Button_Change_Img") as Button);
        this.UserPortraitRefresh.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnUserPortraitRefresh));
        this.UserPortraitRefresh.Visible = false;
        this.UserPortraitChange          = (base.GetControl("Button_Change") as Button);
        this.UserPortraitChange.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnClickUserPortraitChange));
        this.m_SolInterfaceTool.m_DrawTexture_Event = (base.GetControl("DrawTexture_Event") as DrawTexture);
        this.m_SolInterfaceTool.m_Label_EventDate   = (base.GetControl("Label_EventDate") as Label);
        for (int i = 0; i < 2; i++)
        {
            this.m_SolInterfaceTool.m_Lebel_EventHero[i] = (base.GetControl(NrTSingleton <UIDataManager> .Instance.GetString("Label_EventStat", (i + 1).ToString())) as Label);
        }
        this.m_SolInterfaceTool.m_Label_SeasonNum = (base.GetControl("Label_SeasonNum") as Label);
        this.m_InitiativeValueSlider = (base.GetControl("HSlider_HSlider34") as HorizontalSlider);
        this.m_InitiativeValue_text  = (base.GetControl("btn_HELP") as Button);
        this.m_InitiativeValue_text.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnInitiativeValueText));
        this.m_InitiativeValue_Minus = (base.GetControl("btn_MINUS") as Button);
        this.m_InitiativeValue_Minus.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnInitiativeValueMinus));
        this.m_InitiativeValue_Add = (base.GetControl("btn_PLUS") as Button);
        this.m_InitiativeValue_Add.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnInitiativeValueAdd));
        this.m_InitiativeValue_Value = (base.GetControl("Label_NUMBER") as Label);
        this.m_cOnlySkill            = (base.GetControl("CheckBox_button") as CheckBox);
        this.m_cOnlySkill.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickDetailOnlySkillCheckBox));
        this.m_btLock = (base.GetControl("Button_Lock01") as Button);
        this.m_btLock.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickLock));
        this.m_btLock.Visible   = false;
        this.m_dtLock           = (base.GetControl("DrawTexture_Lock01") as DrawTexture);
        this.m_dtLock.Visible   = false;
        this.m_strBaseTextColor = NrTSingleton <CTextParser> .Instance.GetTextColor("1002");

        this.m_strIncTextColor = NrTSingleton <CTextParser> .Instance.GetTextColor("1104");

        this.m_HelpButton = (base.GetControl("Help_Button") as Button);
        this.m_HelpButton.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickHelp));
        this.m_HelpButton.Visible = false;
        this.m_btCostume          = (base.GetControl("BT_Costume") as Button);
        this.m_btCostume.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnClickCostume));
        this.m_btCostume.Visible = false;
        this.m_lbCostume         = (base.GetControl("LB_CostumeBT") as Label);
        this.m_lbCostume.Visible = false;
        this.m_btnClose          = (base.GetControl("Close_Button") as Button);
        this.m_btnClose.AddValueChangedDelegate(new EZValueChangedDelegate(this.CloseForm));
        this.m_btnSolPreview = (base.GetControl("Button_SolPreview") as Button);
        this.m_btnSolPreview.AddValueChangedDelegate(new EZValueChangedDelegate(this.Click_PreViewHero));
        this.m_btnSolPreview.Visible = false;
        this.InitData();
    }
Ejemplo n.º 7
0
    public override void SetComponent()
    {
        this.m_Toolbar = (base.GetControl("ToolBar_ToolBar28") as Toolbar);
        this.m_Toolbar.Control_Tab[0].Text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1648");

        UIPanelTab expr_44 = this.m_Toolbar.Control_Tab[0];

        expr_44.ButtonClick = (EZValueChangedDelegate)Delegate.Combine(expr_44.ButtonClick, new EZValueChangedDelegate(this.ClickToolbar));
        this.m_Toolbar.Control_Tab[2].Text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1645");

        UIPanelTab expr_93 = this.m_Toolbar.Control_Tab[2];

        expr_93.ButtonClick = (EZValueChangedDelegate)Delegate.Combine(expr_93.ButtonClick, new EZValueChangedDelegate(this.ClickToolbar));
        this.m_Toolbar.Control_Tab[1].Text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2852");

        UIPanelTab expr_E2 = this.m_Toolbar.Control_Tab[1];

        expr_E2.ButtonClick = (EZValueChangedDelegate)Delegate.Combine(expr_E2.ButtonClick, new EZValueChangedDelegate(this.ClickToolbar));
        this.m_Toolbar.Control_Tab[1].Visible           = false;
        this.m_SolInterfaceTool.m_Label_Character_Name  = (base.GetControl("Label_character_name") as Label);
        this.m_SolInterfaceTool.m_Label_SeasonNum       = (base.GetControl("Label_SeasonNum") as Label);
        this.m_SolInterfaceTool.m_DrawTexture_rank      = (base.GetControl("DrawTexture_rank") as DrawTexture);
        this.m_SolInterfaceTool.m_Label_Rank2           = (base.GetControl("Label_rank2") as Label);
        this.m_SolInterfaceTool.m_DrawTexture_Character = (base.GetControl("DrawTexture_character") as DrawTexture);
        this.m_Button_MovieBtn = (base.GetControl("Button_MovieBtn") as Button);
        this.m_Button_MovieBtn.AddValueChangedDelegate(new EZValueChangedDelegate(this.Click_PreViewHero));
        this.m_SolInterfaceTool.m_DrawTexture_Event = (base.GetControl("DrawTexture_Event") as DrawTexture);
        this.m_SolInterfaceTool.m_Label_EventDate   = (base.GetControl("Label_EventDate") as Label);
        for (int i = 0; i < 2; i++)
        {
            this.m_SolInterfaceTool.m_Lebel_EventHero[i] = (base.GetControl(NrTSingleton <UIDataManager> .Instance.GetString("Label_EventStat", (i + 1).ToString())) as Label);
        }
        this.m_SolInterfaceTool.m_DrawTextureWeapon    = (base.GetControl("DT_WEAPON") as DrawTexture);
        this.m_SolInterfaceTool.m_DrawTextureSkillIcon = (base.GetControl("DT_SKILLICON") as DrawTexture);
        this.m_ButtonSkillIcon = (base.GetControl("DT_SKILLBUTTON") as Button);
        this.m_ButtonSkillIcon.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnClickSkillIcon));
        this.m_Label_Stats_str2 = (base.GetControl("Label_stats_str2") as Label);
        this.m_Label_Stats_dex2 = (base.GetControl("Label_stats_dex2") as Label);
        this.m_Label_Stats_vit2 = (base.GetControl("Label_stats_vit2") as Label);
        this.m_Label_Stats_int2 = (base.GetControl("Label_stats_int2") as Label);
        this.m_ScrollLabel_info = (base.GetControl("ScrollLabel_info") as ScrollLabel);
        this.m_Button_ok        = (base.GetControl("btn_ok") as Button);
        this.m_Button_ok.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnClickOK));
        this.m_Button_Help = (base.GetControl("Button_Help") as Button);
        this.m_Button_Help.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickHelp));
        this.m_NewListBox_Reincarnate             = (base.GetControl("NewListBox_Reincarnate") as NewListBox);
        this.m_NewListBox_Reincarnate.touchScroll = false;
        this.m_Button_Reincarnate = (base.GetControl("btn_Reincarnate") as Button);
        this.m_Button_Reincarnate.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnClickReincarnate));
        this.m_Button_Reincarnate.SetEnabled(false);
        this.m_Label_Gold   = (base.GetControl("Label_Gold2") as Label);
        this.m_Label_Notice = (base.GetControl("Label_Label38") as Label);
        this.m_Toolbar.SetSelectTabIndex(0);
        this.m_btClose = (base.GetControl("Close_Button") as Button);
        this.m_btClose.AddValueChangedDelegate(new EZValueChangedDelegate(this.CloseForm));
        this.m_Button_Costume = (base.GetControl("Btn_Costume") as Button);
        this.m_Button_Costume.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnClickCostume));
        this.m_Label_Costume     = (base.GetControl("LB_Costume") as Label);
        this.m_cMythSkillControl = new SolDetail_Info_Dlg.SolMythSkillSlotControl();
        this.m_cMythSkillControl.SetComponent(this);
        base.SetShowLayer(1, true);
        base.SetShowLayer(2, false);
        base.SetShowLayer(3, false);
        base.SetShowLayer(4, false);
        this.m_bLayer3Show = false;
        base.Draggable     = false;
        base.SetScreenCenter();
        base.ShowBlackBG(0.5f);
    }