예제 #1
0
 // Token: 0x06001E71 RID: 7793 RVA: 0x003A4CE4 File Offset: 0x003A2EE4
 public void OnHIButtonClick(UIHIBtn sender)
 {
     if (this.MM.OpenDetail(sender.HIID))
     {
         AudioManager.Instance.PlayUISFXIndex(UIClickSoundIndex.Normal);
     }
 }
예제 #2
0
 // Token: 0x06001ED9 RID: 7897 RVA: 0x003B051C File Offset: 0x003AE71C
 public void OnHIButtonClick(UIHIBtn sender)
 {
     if (this.OpenNext(this.ScrollComp[sender.m_BtnID2].HIBtn.HIID))
     {
         AudioManager.Instance.PlayUISFXIndex(UIClickSoundIndex.Normal);
     }
 }
예제 #3
0
        // Token: 0x06000F68 RID: 3944 RVA: 0x001B3448 File Offset: 0x001B1648
        public void OnHIButtonClick(UIHIBtn sender)
        {
            AudioManager.Instance.PlayUISFXIndex(UIClickSoundIndex.Normal);
            Door door = GUIManager.Instance.FindMenu(EGUIWindow.Door) as Door;

            door.GoToMapID((ushort)sender.m_BtnID2, sender.m_BtnID1, 0, 1, true);
        }
예제 #4
0
 // Token: 0x060027A7 RID: 10151 RVA: 0x0043EBF8 File Offset: 0x0043CDF8
 public void OnHIButtonClick(UIHIBtn sender)
 {
     if (this.pManager.IsSpecialKey())
     {
         return;
     }
     this.TriggerButtonEvent(sender.m_BtnID1);
 }
예제 #5
0
 // Token: 0x06001EC2 RID: 7874 RVA: 0x003AD214 File Offset: 0x003AB414
 void IUIHIBtnClickHandler.OnHIButtonClick(UIHIBtn sender)
 {
     if (sender.m_BtnID2 == 0)
     {
         return;
     }
     GamblingManager.Instance.OpenMenu(EGUIWindow.UI_OpenBox, 1, sender.m_BtnID2, false);
 }
예제 #6
0
 // Token: 0x060016BE RID: 5822 RVA: 0x00273410 File Offset: 0x00271610
 public void OnHIButtonClick(UIHIBtn sender)
 {
     if (sender.m_BtnID1 != 1)
     {
         if (sender.m_BtnID1 == 2)
         {
         }
     }
 }
예제 #7
0
    // Token: 0x06002B96 RID: 11158 RVA: 0x004801A8 File Offset: 0x0047E3A8
    public override void OnHIButtonClick(UIHIBtn sender)
    {
        if (sender.m_BtnID2 == 0)
        {
            return;
        }
        Door door = GUIManager.Instance.FindMenu(EGUIWindow.Door) as Door;

        door.OpenMenu(EGUIWindow.UI_OpenBox, 1, sender.m_BtnID2, false);
    }
예제 #8
0
 // Token: 0x060008FE RID: 2302 RVA: 0x000B7A6C File Offset: 0x000B5C6C
 public void FontRefresh()
 {
     if (this.iconRt != null && this.iconRt.gameObject.activeSelf && this.HIObj != null && this.HIObj.activeSelf)
     {
         UIHIBtn component = this.HIObj.GetComponent <UIHIBtn>();
         if (component != null)
         {
             component.Refresh_FontTexture();
         }
     }
 }
예제 #9
0
 // Token: 0x060027A8 RID: 10152 RVA: 0x0043EC18 File Offset: 0x0043CE18
 public void OnHIButtonUp(UIHIBtn sender)
 {
     if (!this.pManager.IsSpecialKey())
     {
         return;
     }
     if (this.pManager.PreTriggerCheck())
     {
         this.TriggerButtonEvent(0);
     }
 }
예제 #10
0
 // Token: 0x060027AA RID: 10154 RVA: 0x0043ECA4 File Offset: 0x0043CEA4
 public void OnHIButtonDrag(UIHIBtn sender)
 {
     if (this.pManager.WorkingKey == 8010)
     {
         this.pManager.Battle_SecondUltra_BtnDrag();
     }
     else if (this.pManager.WorkingKey == 8011)
     {
         this.pManager.Battle_ThirdUltra_BtnDrag();
     }
 }
예제 #11
0
 // Token: 0x06001BBE RID: 7102 RVA: 0x00314ABC File Offset: 0x00312CBC
 public void OnHIButtonClick(UIHIBtn sender)
 {
     if (this.HeroID == 0)
     {
         return;
     }
     if (this.m_ButtonHint != null)
     {
         this.m_ButtonHint.OnCloseHint();
     }
     GUIManager.Instance.OpenPreviewHeroInfo(this.HeroID, true, 60, 8, 5, 63, 0);
     this.HeroID = 0;
 }
예제 #12
0
파일: UIHeroUp.cs 프로젝트: gsoec/lm-source
    // Token: 0x06001C82 RID: 7298 RVA: 0x00325EA8 File Offset: 0x003240A8
    public void InitUI()
    {
        for (int i = 0; i < 7; i++)
        {
            if (this.m_ScrollItem[i].Str == null)
            {
                this.m_ScrollItem[i].Str = StringManager.Instance.SpawnString(80);
            }
        }
        if (GUIManager.Instance.bOpenOnIPhoneX)
        {
            Transform child = base.transform.GetChild(0);
            if (child != null)
            {
                ((RectTransform)child).offsetMin = new Vector2(-GUIManager.Instance.IPhoneX_DeltaX, 0f);
                ((RectTransform)child).offsetMax = new Vector2(GUIManager.Instance.IPhoneX_DeltaX, 0f);
            }
        }
        this.m_Light   = base.transform.GetChild(0).GetChild(4).GetComponent <Image>();
        this.m_LightTf = base.transform.GetChild(0).GetChild(4);
        UIText component = base.transform.GetChild(3).GetChild(0).GetComponent <UIText>();

        component.font = this.TTF;
        component.text = this.DM.mStringTable.GetStringByID(5911u);
        component      = base.transform.GetChild(3).GetChild(1).GetComponent <UIText>();
        component.font = this.TTF;
        component.text = this.DM.mStringTable.GetStringByID(5912u);
        if (GUIManager.Instance.IsArabic)
        {
            component.rectTransform.anchoredPosition = component.ArabicFixPos(new Vector2(64f, 210f));
        }
        UIButton component2 = base.transform.GetChild(4).GetComponent <UIButton>();

        component2.m_Handler = this;
        UIHIBtn component3 = base.transform.GetChild(2).GetChild(1).GetComponent <UIHIBtn>();

        GUIManager.Instance.InitianHeroItemImg(component3.transform, eHeroOrItem.Hero, 1, 1, 1, 1, false, false, true, false);
        this.m_ScrollPanel = base.transform.GetChild(1).GetComponent <ScrollPanel>();
        List <float> list = new List <float>();

        for (int j = 0; j < this.GM.m_HerodLvUpData.Count; j++)
        {
            list.Add(96f);
        }
        this.m_ScrollPanel.IntiScrollPanel(330f, 1f, 0f, list, 7, this);
    }
예제 #13
0
    // Token: 0x06002C5A RID: 11354 RVA: 0x00488FD0 File Offset: 0x004871D0
    public void OnCloseHint()
    {
        GUIManager.Instance.HintMaskObj.HideBtn.m_Handler = null;
        if (this.FadeOutCanvas)
        {
            this.bFadeOut = true;
            this.FadeTime = 0f;
        }
        switch (this.m_eHint)
        {
        case EUIButtonHint.UIHIBtn:
        {
            UIHIBtn uihibtn = this.m_Button as UIHIBtn;
            if (!(uihibtn == null))
            {
                eHeroOrItem heroOrItem = (eHeroOrItem)uihibtn.HeroOrItem;
                if (heroOrItem == eHeroOrItem.Hero || heroOrItem == eHeroOrItem.Item)
                {
                    this.BtnAction = UIButtonHint._BntAction.BtnUp;
                }
            }
            break;
        }

        case EUIButtonHint.DownUpHandler:
        case EUIButtonHint.UILeBtn:
        case EUIButtonHint.UIArena_Hint:
            this.BtnAction = UIButtonHint._BntAction.BtnUp;
            break;

        case EUIButtonHint.Slider:
            if (this.m_DownUpHandler != null)
            {
                this.m_DownUpHandler.OnButtonUp(this);
            }
            break;

        case EUIButtonHint.CountDown:
            this.m_Time     = 0f;
            this.bCountDown = false;
            this.BtnAction  = UIButtonHint._BntAction.BtnUp;
            break;
        }
    }
예제 #14
0
파일: _PetCell.cs 프로젝트: gsoec/lm-source
    // Token: 0x0600172B RID: 5931 RVA: 0x0027E078 File Offset: 0x0027C278
    public void TextRefresh()
    {
        if (this.NumText == null)
        {
            return;
        }
        this.NameText.enabled = false;
        this.NameText.enabled = true;
        this.NumText.enabled  = false;
        this.NumText.enabled  = true;
        this.NewText.enabled  = false;
        this.NewText.enabled  = true;
        UIHIBtn component = this.ItemTrans.GetComponent <UIHIBtn>();

        if (component != null)
        {
            component.Refresh_FontTexture();
        }
        component = this.PetTrans.GetComponent <UIHIBtn>();
        if (component != null)
        {
            component.Refresh_FontTexture();
        }
    }
예제 #15
0
    // Token: 0x06002C56 RID: 11350 RVA: 0x00488CB4 File Offset: 0x00486EB4
    public void OnPointerDown(PointerEventData eventData)
    {
        if (!base.enabled || !base.gameObject.activeInHierarchy || (this.m_Button != null && !this.m_Button.IsInteractable()))
        {
            return;
        }
        if (this.m_eHint == EUIButtonHint.UIHIBtn || this.m_eHint == EUIButtonHint.UILeBtn)
        {
            this.SetFadeOutObject(this.m_eHint);
        }
        if (UIButtonHint.DelayFadeOutHint)
        {
            UIButtonHint.DelayFadeOutHint.ForceCloseHint();
        }
        if (GUIManager.Instance.HintMaskObj.HideBtn.m_Handler != null)
        {
            GUIManager.Instance.HintMaskObj.HideBtn.m_Handler.OnButtonClick(null);
        }
        if (this.GetCScrollRect() != null && this.GetCScrollRect().content != null)
        {
            this.PressPosition = this.GetCScrollRect().content.anchoredPosition;
        }
        else
        {
            this.PressPosition = base.transform.position;
        }
        this.BtnAction = UIButtonHint._BntAction.BtnDown;
        UIButtonHint.DelayFadeOutHint = this;
        GUIManager.Instance.HintMaskObj.Hide(this);
        this.IsValidClick = 1;
        if (this.FadeOutCanvas)
        {
            this.bFadeOut            = false;
            this.FadeOutCanvas.alpha = 1f;
        }
        switch (this.m_eHint)
        {
        case EUIButtonHint.UIHIBtn:
        {
            UIHIBtn uihibtn = this.m_Button as UIHIBtn;
            if (!(uihibtn == null))
            {
                eHeroOrItem heroOrItem = (eHeroOrItem)uihibtn.HeroOrItem;
                if (heroOrItem != eHeroOrItem.Hero)
                {
                    if (heroOrItem == eHeroOrItem.Item)
                    {
                        GUIManager.Instance.m_SimpleItemInfo.Show(this, uihibtn.HIID, -1, UIButtonHint.ePosition.Original, null);
                    }
                }
                else
                {
                    GUIManager.Instance.m_SimpleItemInfo.ShowHero(this, uihibtn.HIID, (ushort)uihibtn.m_BtnID1, (ushort)uihibtn.m_BtnID2);
                }
            }
            break;
        }

        case EUIButtonHint.DownUpHandler:
        case EUIButtonHint.Slider:
            if (this.m_DownUpHandler != null)
            {
                this.m_DownUpHandler.OnButtonDown(this);
            }
            break;

        case EUIButtonHint.CountDown:
            this.m_Time     = 0f;
            this.bCountDown = true;
            break;

        case EUIButtonHint.UILeBtn:
            if (this.m_DownUpHandler != null)
            {
                this.m_DownUpHandler.OnButtonDown(this);
            }
            break;

        case EUIButtonHint.UIArena_Hint:
            if (this.m_DownUpHandler != null)
            {
                this.m_DownUpHandler.OnButtonDown(this);
            }
            break;
        }
        if (this.GetCScrollRect() != null)
        {
            this.GetCScrollRect().OnBeginDrag(eventData);
        }
        if (this.GetScrollRect() != null)
        {
            this.GetScrollRect().OnBeginDrag(eventData);
        }
    }
예제 #16
0
파일: UIJail.cs 프로젝트: gsoec/lm-source
    // Token: 0x06001D1A RID: 7450 RVA: 0x00342EB8 File Offset: 0x003410B8
    public void UpDateRowItem(GameObject item, int dataIdx, int panelObjectIdx, int panelId)
    {
        byte b = this.DM.sortedPrisonerList[(int)this.SPdispIdx[dataIdx]];

        this.SPnowIdx[panelObjectIdx] = b;
        this.SPItem[panelObjectIdx]   = item.transform;
        UIHIBtn component = item.transform.GetChild(1).GetComponent <UIHIBtn>();

        GUIManager.Instance.InitianHeroItemImg(component.transform, eHeroOrItem.Hero, this.DM.PrisonerList[(int)b].head, 11, 0, 0, false, false, true, false);
        UIText component2 = item.transform.GetChild(2).GetComponent <UIText>();

        this.SPLv[panelObjectIdx].ClearString();
        this.SPLv[panelObjectIdx].IntToFormat((long)this.DM.PrisonerList[(int)b].LordLevel, 1, false);
        this.SPLv[panelObjectIdx].AppendFormat(this.DM.mStringTable.GetStringByID(7757u));
        component2.text = this.SPLv[panelObjectIdx].ToString();
        component2.SetAllDirty();
        component2.cachedTextGenerator.Invalidate();
        component2 = item.transform.GetChild(3).GetComponent <UIText>();
        this.SPName[panelObjectIdx].ClearString();
        GameConstants.GetNameString(this.SPName[panelObjectIdx], this.DM.PrisonerList[(int)b].KingdomID, this.DM.PrisonerList[(int)b].name, this.DM.PrisonerList[(int)b].AlliTag, false);
        component2.text = this.SPName[panelObjectIdx].ToString();
        component2.SetAllDirty();
        component2.cachedTextGenerator.Invalidate();
        component2 = item.transform.GetChild(8).GetComponent <UIText>();
        UISpritesArray component3 = item.transform.GetChild(6).GetComponent <UISpritesArray>();
        long           num        = this.DM.PrisonerList[(int)b].StartActionTime + (long)((ulong)this.DM.PrisonerList[(int)b].TotalTime) - this.DM.ServerTime;

        if (num < 0L)
        {
            num = 0L;
        }
        RectTransform component4 = item.transform.GetChild(6).GetComponent <RectTransform>();

        this.SPStat[panelObjectIdx].ClearString();
        switch (this.DM.PrisonerList[(int)b].nowStat)
        {
        case PrisonerState.WaitForRelease:
        {
            this.SPStat[panelObjectIdx].Append(this.DM.mStringTable.GetStringByID(7768u));
            component3.SetSpriteIndex(2);
            item.transform.GetChild(4).gameObject.SetActive(false);
            float num2 = (float)num / this.DM.PrisonerList[(int)b].TotalTime;
            num2 = Mathf.Clamp01(1f - num2);
            component4.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, num2 * 255f);
            break;
        }

        case PrisonerState.WaitForExecute:
            if (num > 21600L)
            {
                num -= 21600L;
                this.SPStat[panelObjectIdx].Append(this.DM.mStringTable.GetStringByID(7759u));
                component3.SetSpriteIndex(1);
                item.transform.GetChild(4).gameObject.SetActive(false);
                float num2 = (float)num / (this.DM.PrisonerList[(int)b].TotalTime - 21600u);
                num2 = Mathf.Clamp01(1f - num2);
                component4.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, num2 * 255f);
            }
            else
            {
                this.SPStat[panelObjectIdx].Append(this.DM.mStringTable.GetStringByID(7758u));
                component3.SetSpriteIndex(0);
                item.transform.GetChild(4).gameObject.SetActive(true);
                component3 = item.transform.GetChild(4).GetComponent <UISpritesArray>();
                component3.SetSpriteIndex(0);
                float num2 = (float)num / 21600f;
                num2 = Mathf.Clamp01(1f - num2);
                component4.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, num2 * 255f);
            }
            break;

        case PrisonerState.Poisoned:
        {
            this.SPStat[panelObjectIdx].Append(this.DM.mStringTable.GetStringByID(15008u));
            component3.SetSpriteIndex(3);
            item.transform.GetChild(4).gameObject.SetActive(true);
            component3 = item.transform.GetChild(4).GetComponent <UISpritesArray>();
            component3.SetSpriteIndex(1);
            float num2 = (float)num / this.DM.PrisonerList[(int)b].TotalTime;
            num2 = Mathf.Clamp01(1f - num2);
            component4.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, num2 * 255f);
            break;
        }
        }
        component2.text = this.SPStat[panelObjectIdx].ToString();
        component2.SetAllDirty();
        component2.cachedTextGenerator.Invalidate();
        component2 = item.transform.GetChild(9).GetComponent <UIText>();
        this.SPTime[panelObjectIdx].ClearString();
        GameConstants.GetTimeString(this.SPTime[panelObjectIdx], (uint)num, true, true, true, false, true);
        component2.text = this.SPTime[panelObjectIdx].ToString();
        component2.SetAllDirty();
        component2.cachedTextGenerator.Invalidate();
        UIButton component5 = item.transform.GetChild(0).GetComponent <UIButton>();

        component5.m_BtnID1  = (int)this.SPdispIdx[dataIdx];
        component5.m_Handler = this;
    }
예제 #17
0
    // Token: 0x0600093F RID: 2367 RVA: 0x000BCE0C File Offset: 0x000BB00C
    private void Update()
    {
        float smoothDeltaTime = Time.smoothDeltaTime;

        if (this.TickCount != -1f)
        {
            this.TickCount += smoothDeltaTime;
        }
        if (this.TickCount >= this.TickTimes)
        {
            this.TickCount = 0f;
            if (this.NowIndex < (int)this.DM.QBTimes)
            {
                this.RBBlockText[this.NowIndex]  = new UIText[4];
                this.BlockTextStr[this.NowIndex] = new CString[3];
                int        index      = (!this.bHasBonus) ? (this.NowIndex + 2) : (this.NowIndex + 3);
                GameObject gameObject = UnityEngine.Object.Instantiate(this.tmpBlock) as GameObject;
                gameObject.SetActive(true);
                gameObject.transform.SetParent(this.ContentT, false);
                RectTransform component = gameObject.GetComponent <RectTransform>();
                component.localPosition = new Vector3(component.localPosition.x, -this.BlockTop, 0f);
                this.tmpHeight          = this.GetBlockHeight((int)this.DM.QBRewardLen[this.NowIndex], false);
                component.sizeDelta     = new Vector2(component.sizeDelta.x, this.tmpHeight);
                this.BlockTop          += this.tmpHeight + 10f;
                Transform child = this.ContentT.GetChild(index);
                this.BlockTextStr[this.NowIndex][0] = StringManager.Instance.SpawnString(30);
                this.BlockTextStr[this.NowIndex][0].IntToFormat((long)(this.NowIndex + 1), 1, false);
                this.BlockTextStr[this.NowIndex][0].AppendFormat("{0}");
                this.RBBlockText[this.NowIndex][0]      = child.GetChild(6).GetComponent <UIText>();
                this.RBBlockText[this.NowIndex][0].text = this.BlockTextStr[this.NowIndex][0].ToString();
                this.RBBlockText[this.NowIndex][0].font = this.tmpFont;
                Level   levelBycurrentPointID = DataManager.StageDataController.GetLevelBycurrentPointID(0);
                LevelUp recordByKey           = this.DM.LevelUpTable.GetRecordByKey(levelBycurrentPointID.LeadLV);
                this.BlockTextStr[this.NowIndex][1] = StringManager.Instance.SpawnString(30);
                uint exp = (uint)(recordByKey.BattleHeroLeadExp * ((DataManager.StageDataController._stageMode != StageMode.Lean) ? 1 : 2));
                this.BlockTextStr[this.NowIndex][1].IntToFormat((long)((ulong)DataManager.Instance.GetExpAddition(exp)), 1, true);
                this.BlockTextStr[this.NowIndex][1].AppendFormat("{0}");
                this.RBBlockText[this.NowIndex][1]      = child.GetChild(4).GetComponent <UIText>();
                this.RBBlockText[this.NowIndex][1].text = this.BlockTextStr[this.NowIndex][1].ToString();
                this.RBBlockText[this.NowIndex][1].font = this.tmpFont;
                this.BlockTextStr[this.NowIndex][2]     = StringManager.Instance.SpawnString(30);
                this.BlockTextStr[this.NowIndex][2].IntToFormat((long)((ulong)this.DM.QBMoney), 1, true);
                this.BlockTextStr[this.NowIndex][2].AppendFormat("{0}");
                this.RBBlockText[this.NowIndex][2]      = child.GetChild(5).GetComponent <UIText>();
                this.RBBlockText[this.NowIndex][2].text = this.BlockTextStr[this.NowIndex][2].ToString();
                this.RBBlockText[this.NowIndex][2].font = this.tmpFont;
                if (this.DM.QBRewardLen[this.NowIndex] > 0)
                {
                    GameObject gameObject2 = child.GetChild(8).gameObject;
                    for (int i = 0; i < (int)this.DM.QBRewardLen[this.NowIndex]; i++)
                    {
                        GameObject gameObject3 = UnityEngine.Object.Instantiate(gameObject2) as GameObject;
                        gameObject3.SetActive(true);
                        gameObject3.transform.SetParent(child, false);
                        component = gameObject3.GetComponent <RectTransform>();
                        component.localPosition += new Vector3(88f * (float)(i % 6), -88f * (float)(i / 6), 0f);
                        ushort num = this.DM.QBRewardData[this.NowRWIndex];
                        this.NowRWIndex++;
                        UIHIBtn component2 = gameObject3.transform.GetComponent <UIHIBtn>();
                        component2.m_BtnID1  = (int)num;
                        component2.m_BtnID2  = 0;
                        component2.m_Handler = this;
                        this.GM.InitianHeroItemImg(gameObject3.transform, eHeroOrItem.Item, num, 0, 0, 0, false, true, true, false);
                        gameObject3.SetActive(true);
                    }
                    UnityEngine.Object.Destroy(gameObject2);
                }
                else
                {
                    child.GetChild(8).gameObject.SetActive(false);
                    child.GetChild(7).gameObject.SetActive(true);
                    this.RBBlockText[this.NowIndex][3]      = child.GetChild(7).GetComponent <UIText>();
                    this.RBBlockText[this.NowIndex][3].text = this.DM.mStringTable.GetStringByID(1597u);
                    this.RBBlockText[this.NowIndex][3].font = this.tmpFont;
                }
                this.HintRC[this.NowIndex] = new RectTransform[2];
                UIButton component3 = gameObject.transform.GetChild(9).GetComponent <UIButton>();
                this.HintRC[this.NowIndex][0] = gameObject.transform.GetChild(9).GetComponent <RectTransform>();
                UIButtonHint uibuttonHint = component3.gameObject.AddComponent <UIButtonHint>();
                uibuttonHint.m_eHint        = EUIButtonHint.DownUpHandler;
                uibuttonHint.m_Handler      = this;
                uibuttonHint.ControlFadeOut = this.m_HintBox.gameObject;
                component3.m_BtnID1         = this.NowIndex;
                component3.m_BtnID2         = 1;
                component3 = gameObject.transform.GetChild(10).GetComponent <UIButton>();
                this.HintRC[this.NowIndex][1] = gameObject.transform.GetChild(10).GetComponent <RectTransform>();
                uibuttonHint                = component3.gameObject.AddComponent <UIButtonHint>();
                uibuttonHint.m_eHint        = EUIButtonHint.DownUpHandler;
                uibuttonHint.m_Handler      = this;
                uibuttonHint.ControlFadeOut = this.m_HintBox.gameObject;
                component3.m_BtnID1         = this.NowIndex;
                component3.m_BtnID2         = 2;
                if (this.DM.UserLanguage == GameLanguage.GL_Chs)
                {
                    gameObject.transform.GetChild(2).GetComponent <UISpritesArray>().SetSpriteIndex(0);
                }
                if (this.GM.IsArabic)
                {
                    gameObject.transform.GetChild(2).localScale = new Vector3(-1f, 1f, 1f);
                }
                AudioManager.Instance.PlayUISFX(UIKind.HUDTreasure);
            }
            else
            {
                RectTransform component;
                if (this.bHasBonus)
                {
                    Transform child = this.ContentT.GetChild(0);
                    child.gameObject.SetActive(true);
                    component = child.GetComponent <RectTransform>();
                    component.localPosition = new Vector3(component.localPosition.x, -this.BlockTop, 0f);
                    this.tmpHeight          = this.GetBlockHeight(this.bonusCount, true);
                    component.sizeDelta     = new Vector2(component.sizeDelta.x, this.tmpHeight);
                    this.BlockTop          += this.tmpHeight + 10f;
                    this.BonusText          = child.GetChild(3).GetComponent <UIText>();
                    this.BonusText.text     = this.DM.mStringTable.GetStringByID(152u);
                    this.BonusText.font     = this.tmpFont;
                    GameObject gameObject2 = child.GetChild(1).gameObject;
                    this.GM.InitianHeroItemImg(gameObject2.transform, eHeroOrItem.Item, 0, 0, 0, 0, true, true, true, false);
                    for (int j = 0; j < this.bonusCount; j++)
                    {
                        GameObject gameObject3 = UnityEngine.Object.Instantiate(gameObject2) as GameObject;
                        gameObject3.transform.SetParent(child, false);
                        component = gameObject3.GetComponent <RectTransform>();
                        component.localPosition += new Vector3(88f * (float)(j % 7), -88f * (float)(j / 7), 0f);
                        UIHIBtn component2 = gameObject3.transform.GetComponent <UIHIBtn>();
                        component2.m_BtnID1  = (int)this.DM.QBExpItem[j].ItemID;
                        component2.m_BtnID2  = 0;
                        component2.m_Handler = this;
                        this.GM.ChangeHeroItemImg(gameObject3.transform, eHeroOrItem.Item, this.DM.QBExpItem[j].ItemID, 0, 0, (int)this.DM.QBExpItem[j].Quantity);
                        gameObject3.SetActive(true);
                    }
                    UnityEngine.Object.Destroy(gameObject2);
                    AudioManager.Instance.PlayUISFX(UIKind.MissionReward);
                }
                else
                {
                    UnityEngine.Object.Destroy(this.tmpBlock);
                }
                this.ExpBlock.gameObject.SetActive(true);
                component = this.ExpBlock.GetComponent <RectTransform>();
                component.localPosition = new Vector3(component.localPosition.x, -this.BlockTop, 0f);
                component.sizeDelta     = new Vector2(component.sizeDelta.x, 92f);
                this.TickCount          = -1f;
            }
            this.NowIndex++;
            this.moveDelta = this.tmpHeight / this.TickTimes;
        }
        if (this.bMove)
        {
            if (this.ContentRC.sizeDelta.y - this.ContentRC.anchoredPosition.y <= this.ScrollRC.sizeDelta.y)
            {
                this.bMove = false;
                this.m_transform.GetChild(0).GetComponent <ScrollRect>().enabled = true;
                this.GM.UIQueueLockRelease(EGUIQueueLock.UIQL_BattleReport);
                NewbieManager.CheckTeach(ETeachKind.WIPE_OUT, this, false);
                return;
            }
            if (this.NowIndex > 2)
            {
                this.ContentRC.localPosition += new Vector3(0f, this.moveDelta * smoothDeltaTime, 0f);
            }
        }
        if (this.bHintOpen > 0)
        {
            this.SetHint();
        }
    }
예제 #18
0
    // Token: 0x06001A42 RID: 6722 RVA: 0x002C80DC File Offset: 0x002C62DC
    public override void OnOpen(int arg1, int arg2)
    {
        GUIManager.Instance.UIQueueLock(EGUIQueueLock.UIQL_UI_notAllowPopUps);
        Font ttffont = this.GM.GetTTFFont();

        for (int i = 0; i < 10; i++)
        {
            this.str[i] = StringManager.Instance.SpawnString(30);
        }
        CastleUpgradeRewardTbl recordByKey = this.DM.CastleUpgradeRewardTable.GetRecordByKey((ushort)arg1);

        this.mArg1   = (ushort)arg1;
        this.panel   = base.transform;
        this.ExitBtn = this.panel.GetChild(2).GetComponent <RectTransform>();
        UIButton component = this.panel.GetChild(2).GetComponent <UIButton>();

        component.m_Handler    = this;
        component.m_EffectType = e_EffectType.e_Scale;
        Transform child = this.panel.GetChild(1);

        this.truningLight = child.GetChild(0);
        UIText component2 = child.GetChild(4).GetComponent <UIText>();

        component2.text = this.DM.mStringTable.GetStringByID(5777u);
        component2.font = ttffont;
        component2      = child.GetChild(5).GetComponent <UIText>();
        component2.text = this.DM.mStringTable.GetStringByID(5797u);
        component2.font = ttffont;
        component2      = child.GetChild(3).GetComponent <UIText>();
        this.str[0].ClearString();
        this.str[0].IntToFormat((long)arg1, 2, true);
        this.str[0].AppendFormat("{0}");
        component2.text = this.str[0].ToString();
        component2.font = ttffont;
        component2.SetAllDirty();
        component2.cachedTextGenerator.Invalidate();
        child = this.panel.GetChild(3);
        if (recordByKey.UnlockBuilding != 0)
        {
            component2      = child.GetChild(0).GetComponent <UIText>();
            component2.text = this.DM.mStringTable.GetStringByID(9777u);
            component2.font = ttffont;
            component2      = child.GetChild(2).GetComponent <UIText>();
            component2.text = this.DM.mStringTable.GetStringByID((uint)recordByKey.UnlockBuilding);
            component2.font = ttffont;
        }
        else
        {
            RectTransform component3 = child.GetComponent <RectTransform>();
            Vector2       vector     = component3.anchoredPosition;
            child.gameObject.SetActive(false);
            child      = this.panel.GetChild(4);
            component3 = child.GetComponent <RectTransform>();
            vector    -= component3.anchoredPosition;
            vector.x   = 0f;
            component3.anchoredPosition += vector;
            child      = this.panel.GetChild(5);
            component3 = child.GetComponent <RectTransform>();
            component3.anchoredPosition += vector;
            child      = this.panel.GetChild(0);
            component3 = child.GetComponent <RectTransform>();
            float size = component3.rect.height - vector.y;
            component3.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, size);
        }
        int num = 0;

        child           = this.panel.GetChild(4);
        component2      = child.GetChild(0).GetComponent <UIText>();
        component2.text = this.DM.mStringTable.GetStringByID(5779u);
        component2.font = ttffont;
        UIHIBtn component4 = child.GetChild(1).GetComponent <UIHIBtn>();

        component4.m_BtnID1   = (int)recordByKey.Item1;
        component4.m_BtnID2   = 0;
        component4.m_Handler  = this;
        component4.HeroOrItem = 1;
        component4.HIID       = recordByKey.Item1;
        this.GM.InitianHeroItemImg(component4.transform, eHeroOrItem.Item, recordByKey.Item1, 0, 0, 0, false, false, true, false);
        UIButtonHint uibuttonHint = component4.gameObject.AddComponent <UIButtonHint>();

        uibuttonHint.m_eHint       = EUIButtonHint.UIHIBtn;
        uibuttonHint.m_HIBtnOffset = new Vector2(25f, -25f);
        uibuttonHint.m_ForcePos    = true;
        component2 = child.GetChild(2).GetComponent <UIText>();
        this.str[1].ClearString();
        this.str[1].IntToFormat((long)recordByKey.Item1Count, 1, false);
        if (this.GM.IsArabic)
        {
            this.str[1].AppendFormat("{0}x");
        }
        else
        {
            this.str[1].AppendFormat("x{0}");
        }
        component2.text = this.str[1].ToString();
        component2.font = ttffont;
        component2.SetAllDirty();
        component2.cachedTextGenerator.Invalidate();
        num++;
        if (recordByKey.Item2 == 0)
        {
            child.GetChild(3).gameObject.SetActive(false);
            child.GetChild(4).gameObject.SetActive(false);
        }
        else
        {
            component4            = child.GetChild(3).GetComponent <UIHIBtn>();
            component4.m_BtnID1   = (int)recordByKey.Item2;
            component4.m_BtnID2   = 0;
            component4.m_Handler  = this;
            component4.HeroOrItem = 1;
            component4.HIID       = recordByKey.Item2;
            this.GM.InitianHeroItemImg(component4.transform, eHeroOrItem.Item, recordByKey.Item2, 0, 0, 0, false, true, true, false);
            uibuttonHint               = component4.gameObject.AddComponent <UIButtonHint>();
            uibuttonHint.m_eHint       = EUIButtonHint.UIHIBtn;
            uibuttonHint.m_HIBtnOffset = new Vector2(25f, -25f);
            uibuttonHint.m_ForcePos    = true;
            component2 = child.GetChild(4).GetComponent <UIText>();
            this.str[2].ClearString();
            this.str[2].IntToFormat((long)recordByKey.Item2Count, 1, false);
            if (this.GM.IsArabic)
            {
                this.str[2].AppendFormat("{0}x");
            }
            else
            {
                this.str[2].AppendFormat("x{0}");
            }
            component2.text = this.str[2].ToString();
            component2.font = ttffont;
            component2.SetAllDirty();
            component2.cachedTextGenerator.Invalidate();
            num++;
        }
        if (recordByKey.Item3 == 0)
        {
            child.GetChild(5).gameObject.SetActive(false);
            child.GetChild(6).gameObject.SetActive(false);
        }
        else
        {
            component4            = child.GetChild(5).GetComponent <UIHIBtn>();
            component4.m_BtnID1   = (int)recordByKey.Item3;
            component4.m_BtnID2   = 0;
            component4.m_Handler  = this;
            component4.HeroOrItem = 1;
            component4.HIID       = recordByKey.Item3;
            this.GM.InitianHeroItemImg(component4.transform, eHeroOrItem.Item, recordByKey.Item3, 0, 0, 0, false, true, true, false);
            uibuttonHint               = component4.gameObject.AddComponent <UIButtonHint>();
            uibuttonHint.m_eHint       = EUIButtonHint.UIHIBtn;
            uibuttonHint.m_HIBtnOffset = new Vector2(25f, -25f);
            uibuttonHint.m_ForcePos    = true;
            component2 = child.GetChild(6).GetComponent <UIText>();
            this.str[3].ClearString();
            this.str[3].IntToFormat((long)recordByKey.Item3Count, 1, false);
            if (this.GM.IsArabic)
            {
                this.str[3].AppendFormat("{0}x");
            }
            else
            {
                this.str[3].AppendFormat("x{0}");
            }
            component2.text = this.str[3].ToString();
            component2.font = ttffont;
            component2.SetAllDirty();
            component2.cachedTextGenerator.Invalidate();
            num++;
        }
        if (recordByKey.Item4 == 0)
        {
            child.GetChild(7).gameObject.SetActive(false);
            child.GetChild(8).gameObject.SetActive(false);
        }
        else
        {
            component4            = child.GetChild(7).GetComponent <UIHIBtn>();
            component4.m_BtnID1   = (int)recordByKey.Item4;
            component4.m_BtnID2   = 0;
            component4.m_Handler  = this;
            component4.HeroOrItem = 1;
            component4.HIID       = recordByKey.Item4;
            this.GM.InitianHeroItemImg(component4.transform, eHeroOrItem.Item, recordByKey.Item4, 0, 0, 0, false, true, true, false);
            uibuttonHint               = component4.gameObject.AddComponent <UIButtonHint>();
            uibuttonHint.m_eHint       = EUIButtonHint.UIHIBtn;
            uibuttonHint.m_HIBtnOffset = new Vector2(25f, -25f);
            uibuttonHint.m_ForcePos    = true;
            component2 = child.GetChild(8).GetComponent <UIText>();
            this.str[4].ClearString();
            this.str[4].IntToFormat((long)recordByKey.Item4Count, 1, false);
            if (this.GM.IsArabic)
            {
                this.str[4].AppendFormat("{0}x");
            }
            else
            {
                this.str[4].AppendFormat("x{0}");
            }
            component2.text = this.str[4].ToString();
            component2.font = ttffont;
            component2.SetAllDirty();
            component2.cachedTextGenerator.Invalidate();
            num++;
        }
        float num2 = (float)(30 - 84 * num / 2);

        for (int j = 0; j < num; j++)
        {
            RectTransform component3 = child.GetChild(j * 2 + 1).GetComponent <RectTransform>();
            Vector2       vector     = component3.anchoredPosition;
            vector.x = num2 + (float)(84 * j);
            component3.anchoredPosition = vector;
            component3 = child.GetChild(j * 2 + 2).GetComponent <RectTransform>();
            vector     = component3.anchoredPosition;
            vector.x   = num2 + (float)(84 * j) + 25f;
            component3.anchoredPosition = vector;
        }
        child           = this.panel.GetChild(5);
        component2      = child.GetChild(0).GetComponent <UIText>();
        component2.text = this.DM.mStringTable.GetStringByID(5780u);
        component2.font = ttffont;
        string format;

        if (!GUIManager.Instance.IsArabic)
        {
            format = "+{0}";
        }
        else
        {
            format = "{0}+";
        }
        component2 = child.GetChild(8).GetComponent <UIText>();
        this.str[5].ClearString();
        this.str[5].IntToFormat((long)((ulong)recordByKey.Gold), 1, true);
        this.str[5].AppendFormat(format);
        component2.text = this.str[5].ToString();
        component2.font = ttffont;
        component2.SetAllDirty();
        component2.cachedTextGenerator.Invalidate();
        component2 = child.GetChild(9).GetComponent <UIText>();
        this.str[6].ClearString();
        this.str[6].IntToFormat((long)((ulong)recordByKey.Grain), 1, true);
        this.str[6].AppendFormat(format);
        component2.text = this.str[6].ToString();
        component2.font = ttffont;
        component2.SetAllDirty();
        component2.cachedTextGenerator.Invalidate();
        component2 = child.GetChild(10).GetComponent <UIText>();
        this.str[7].ClearString();
        this.str[7].IntToFormat((long)((ulong)recordByKey.Rock), 1, true);
        this.str[7].AppendFormat(format);
        component2.text = this.str[7].ToString();
        component2.font = ttffont;
        component2.SetAllDirty();
        component2.cachedTextGenerator.Invalidate();
        component2 = child.GetChild(11).GetComponent <UIText>();
        this.str[8].ClearString();
        this.str[8].IntToFormat((long)((ulong)recordByKey.Wood), 1, true);
        this.str[8].AppendFormat(format);
        component2.text = this.str[8].ToString();
        component2.font = ttffont;
        component2.SetAllDirty();
        component2.cachedTextGenerator.Invalidate();
        component2 = child.GetChild(12).GetComponent <UIText>();
        this.str[9].ClearString();
        this.str[9].IntToFormat((long)((ulong)recordByKey.Iron), 1, true);
        this.str[9].AppendFormat(format);
        component2.text = this.str[9].ToString();
        component2.font = ttffont;
        component2.SetAllDirty();
        component2.cachedTextGenerator.Invalidate();
        this.panel.GetChild(1).SetAsLastSibling();
        this.panel.GetChild(1).SetAsLastSibling();
        AudioManager.Instance.PlayUISFX(UIKind.DominanceLevelup);
        int num3 = 0;

        Array.Clear(this.GM.SE_Kind, 0, this.GM.SE_Kind.Length);
        for (int k = 0; k < 5; k++)
        {
            this.GM.SE_Kind[num3] = SpeciallyEffect_Kind.Food + (int)((byte)k);
            num3++;
        }
        this.GM.m_SpeciallyEffect.mResValue[0] = recordByKey.Grain;
        this.GM.m_SpeciallyEffect.mResValue[1] = recordByKey.Rock;
        this.GM.m_SpeciallyEffect.mResValue[2] = recordByKey.Wood;
        this.GM.m_SpeciallyEffect.mResValue[3] = recordByKey.Iron;
        this.GM.m_SpeciallyEffect.mResValue[4] = recordByKey.Gold;
        Array.Clear(this.GM.SE_ItemID, 0, this.GM.SE_ItemID.Length);
        this.GM.SE_ItemID[0] = recordByKey.Item1;
        if (recordByKey.Item2 != 0)
        {
            this.GM.SE_ItemID[1] = recordByKey.Item2;
        }
        if (recordByKey.Item3 != 0)
        {
            this.GM.SE_ItemID[2] = recordByKey.Item3;
        }
        this.GM.mStartV2 = new Vector2(this.GM.m_SpeciallyEffect.mCanvasRT.sizeDelta.x / 2f, this.GM.m_SpeciallyEffect.mCanvasRT.sizeDelta.y / 2f);
        this.GM.m_SpeciallyEffect.AddIconShow(this.GM.mStartV2, this.GM.SE_Kind, this.GM.SE_ItemID, true);
        this.GM.LoadLvUpLight(base.transform);
        NewbieManager.BuildCastleImmediate = false;
        if (this.GM.bOpenOnIPhoneX)
        {
            RectTransform component5 = this.panel.GetComponent <RectTransform>();
            component5.offsetMin = new Vector2(-GUIManager.Instance.IPhoneX_DeltaX, 0f);
            component5.offsetMax = new Vector2(GUIManager.Instance.IPhoneX_DeltaX, 0f);
        }
    }
예제 #19
0
 // Token: 0x06000DA8 RID: 3496 RVA: 0x0015F6D0 File Offset: 0x0015D8D0
 public void OnHIButtonClick(UIHIBtn sender)
 {
     MallManager.Instance.OpenDetail(sender.HIID);
 }
예제 #20
0
    // Token: 0x06001A47 RID: 6727 RVA: 0x002C8F80 File Offset: 0x002C7180
    public void Refresh_FontTexture()
    {
        UIText component = this.panel.GetChild(2).GetChild(0).GetComponent <UIText>();

        if (component != null && component.enabled)
        {
            component.enabled = false;
            component.enabled = true;
        }
        component = this.panel.GetChild(2).GetChild(2).GetComponent <UIText>();
        if (component != null && component.enabled)
        {
            component.enabled = false;
            component.enabled = true;
        }
        component = this.panel.GetChild(3).GetChild(0).GetComponent <UIText>();
        if (component != null && component.enabled)
        {
            component.enabled = false;
            component.enabled = true;
        }
        component = this.panel.GetChild(3).GetChild(2).GetComponent <UIText>();
        if (component != null && component.enabled)
        {
            component.enabled = false;
            component.enabled = true;
        }
        component = this.panel.GetChild(3).GetChild(4).GetComponent <UIText>();
        if (component != null && component.enabled)
        {
            component.enabled = false;
            component.enabled = true;
        }
        component = this.panel.GetChild(3).GetChild(6).GetComponent <UIText>();
        if (component != null && component.enabled)
        {
            component.enabled = false;
            component.enabled = true;
        }
        component = this.panel.GetChild(3).GetChild(8).GetComponent <UIText>();
        if (component != null && component.enabled)
        {
            component.enabled = false;
            component.enabled = true;
        }
        component = this.panel.GetChild(4).GetChild(0).GetComponent <UIText>();
        if (component != null && component.enabled)
        {
            component.enabled = false;
            component.enabled = true;
        }
        component = this.panel.GetChild(4).GetChild(8).GetComponent <UIText>();
        if (component != null && component.enabled)
        {
            component.enabled = false;
            component.enabled = true;
        }
        component = this.panel.GetChild(4).GetChild(9).GetComponent <UIText>();
        if (component != null && component.enabled)
        {
            component.enabled = false;
            component.enabled = true;
        }
        component = this.panel.GetChild(4).GetChild(10).GetComponent <UIText>();
        if (component != null && component.enabled)
        {
            component.enabled = false;
            component.enabled = true;
        }
        component = this.panel.GetChild(4).GetChild(11).GetComponent <UIText>();
        if (component != null && component.enabled)
        {
            component.enabled = false;
            component.enabled = true;
        }
        component = this.panel.GetChild(4).GetChild(12).GetComponent <UIText>();
        if (component != null && component.enabled)
        {
            component.enabled = false;
            component.enabled = true;
        }
        component = this.panel.GetChild(5).GetChild(3).GetComponent <UIText>();
        if (component != null && component.enabled)
        {
            component.enabled = false;
            component.enabled = true;
        }
        component = this.panel.GetChild(5).GetChild(4).GetComponent <UIText>();
        if (component != null && component.enabled)
        {
            component.enabled = false;
            component.enabled = true;
        }
        component = this.panel.GetChild(5).GetChild(5).GetComponent <UIText>();
        if (component != null && component.enabled)
        {
            component.enabled = false;
            component.enabled = true;
        }
        for (int i = 0; i < this.panel.GetChild(3).childCount; i++)
        {
            UIHIBtn component2 = this.panel.GetChild(3).GetChild(i).GetComponent <UIHIBtn>();
            if (component2 != null)
            {
                component2.Refresh_FontTexture();
            }
        }
    }
예제 #21
0
 // Token: 0x060027AC RID: 10156 RVA: 0x0043ECFC File Offset: 0x0043CEFC
 public void OnHIButtonDragExit(UIHIBtn sender)
 {
 }
예제 #22
0
 // Token: 0x06001679 RID: 5753 RVA: 0x0026B26C File Offset: 0x0026946C
 void IUIHIBtnUpDownHandler.OnHIButtonUp(UIHIBtn sender)
 {
 }
예제 #23
0
 // Token: 0x06001678 RID: 5752 RVA: 0x0026B260 File Offset: 0x00269460
 void IUIHIBtnUpDownHandler.OnHIButtonDown(UIHIBtn sender)
 {
     this.SelBtn = sender;
 }
예제 #24
0
    // Token: 0x06001F35 RID: 7989 RVA: 0x003BC338 File Offset: 0x003BA538
    private void InitUI()
    {
        for (int i = 0; i < this.m_Data.Length; i++)
        {
            this.m_Data[i].Init();
        }
        for (int j = 0; j < this.m_PanelObject.Length; j++)
        {
            this.m_PanelObject[j].Init();
        }
        this.m_SpArray                = base.transform.gameObject.GetComponent <UISpritesArray>();
        this.m_TitleText1             = base.transform.GetChild(0).GetChild(4).GetComponent <UIText>();
        this.m_TitleText1.font        = this.TTF;
        this.m_TitleText1.text        = this.DM.mStringTable.GetStringByID(1339u);
        this.m_TitleText2             = base.transform.GetChild(0).GetChild(8).GetComponent <UIText>();
        this.m_TitleText2.font        = this.TTF;
        this.m_TitleText2.text        = this.DM.mStringTable.GetStringByID(1368u);
        this.m_OverText               = base.transform.GetChild(0).GetChild(10).GetComponent <UIText>();
        this.m_OverText.font          = this.TTF;
        this.m_OverText.text          = this.DM.mStringTable.GetStringByID(1369u);
        this.m_OverText.color         = new Color(1f, 0.968f, 0.6f, 1f);
        this.m_TimeIcon               = base.transform.GetChild(0).GetChild(6).GetComponent <Image>();
        this.m_TimeText               = base.transform.GetChild(0).GetChild(7).GetComponent <UIText>();
        this.m_TimeText.font          = this.TTF;
        this.m_GitImageHint           = base.transform.GetChild(0).GetChild(9).gameObject.AddComponent <UIButtonHint>();
        this.m_GitImageHint.m_Handler = this;
        this.m_GitImageHint.m_eHint   = EUIButtonHint.DownUpHandler;
        this.m_SpecialPrize           = base.transform.GetChild(0).GetChild(11).GetComponent <Image>();
        this.m_ScrollPanel            = base.transform.GetChild(1).GetComponent <ScrollPanel>();
        this.m_Send           = base.transform.GetChild(3).GetComponent <UIButton>();
        this.m_Send.m_BtnID1  = 200;
        this.m_Send.m_Handler = this;
        this.m_FlashImage     = base.transform.GetChild(3).GetChild(0).GetComponent <Image>();
        UIText component = base.transform.GetChild(3).GetChild(1).GetComponent <UIText>();

        component.font        = this.TTF;
        component.text        = this.DM.mStringTable.GetStringByID(1542u);
        this.m_Exit           = base.transform.GetChild(4).GetChild(0).GetComponent <UIButton>();
        this.m_Exit.m_BtnID1  = 100;
        this.m_Exit.m_Handler = this;
        Image component2 = base.transform.GetChild(4).GetComponent <Image>();

        component2.sprite   = this.door.LoadSprite("UI_main_close_base");
        component2.material = this.door.LoadMaterial();
        if (GUIManager.Instance.bOpenOnIPhoneX && component2)
        {
            component2.enabled = false;
        }
        this.m_Exit.image.sprite   = this.door.LoadSprite("UI_main_close");
        this.m_Exit.image.material = this.door.LoadMaterial();
        this.m_FingerImageObject   = base.transform.GetChild(5).gameObject;
        for (int k = 2; k <= 4; k++)
        {
            UIHIBtn component3 = base.transform.GetChild(2).GetChild(k).GetChild(0).GetChild(0).GetComponent <UIHIBtn>();
            this.GM.InitianHeroItemImg(component3.gameObject.transform, eHeroOrItem.Item, 0, 0, 0, 0, false, true, true, false);
            UILEBtn component4 = base.transform.GetChild(2).GetChild(k).GetChild(0).GetChild(3).GetComponent <UILEBtn>();
            component4.gameObject.AddComponent <UIButtonHint>().m_eHint = EUIButtonHint.UILeBtn;
            this.GM.InitLordEquipImg(component4.gameObject.transform, 0, 0, eLordEquipDisplayKind.OnlyItem, false, true, 0, 0, 0, 0, 0, false);
        }
        this.m_AllyRankImage               = base.transform.GetChild(0).GetChild(12).GetComponent <Image>();
        this.m_AllyRankImageHint           = base.transform.GetChild(0).GetChild(12).gameObject.AddComponent <UIButtonHint>();
        this.m_AllyRankImageHint.m_Handler = this;
        this.m_AllyRankImageHint.m_eHint   = EUIButtonHint.DownUpHandler;
        if (this.m_AllyRankImage != null)
        {
            if (this.DM.RoleAlliance.AMRank >= 0)
            {
                this.GM.SetAllyRankImage(this.m_AllyRankImage, this.DM.RoleAlliance.AMRank);
                this.m_AllyRankImage.gameObject.SetActive(true);
            }
            else
            {
                this.m_AllyRankImage.gameObject.SetActive(false);
            }
        }
        base.transform.GetChild(2).GetChild(5).GetComponent <Image>().color = new Color(1f, 1f, 1f, 0.6274f);
        GUIManager.Instance.UpdateUI(EGUIWindow.Door, 1, 1);
    }
예제 #25
0
    // Token: 0x06002795 RID: 10133 RVA: 0x0043C268 File Offset: 0x0043A468
    public void Awake()
    {
        AssetBundle assetBundle = AssetManager.GetAssetBundle("UI/UINewbie", out this.AssetKey, false);

        this.ShareMat = (assetBundle.Load("UI_new_m") as Material);
        this.Black    = new Texture2D(1, 1);
        this.Black.SetPixel(1, 1, new Color32(0, 0, 0, byte.MaxValue));
        this.Black.Apply();
        Shader       shader   = null;
        Shader       shader2  = null;
        AssetManager instance = AssetManager.Instance;
        int          num      = instance.Shaders.Length;

        for (int i = 0; i < num; i++)
        {
            if (instance.Shaders[i].name == "zTWRD2 Shaders/UI/Mask")
            {
                shader2 = (Shader)instance.Shaders[i];
            }
            else if (instance.Shaders[i].name == "zTWRD2 Shaders/UI/Masked")
            {
                shader = (Shader)instance.Shaders[i];
            }
        }
        GameObject gameObject = new GameObject("HoleMaskPanel");

        this.HoleMaskTrans           = gameObject.AddComponent <RectTransform>();
        this.HoleMaskTrans.anchorMin = Vector2.zero;
        this.HoleMaskTrans.anchorMax = Vector2.zero;
        this.HoleMaskTrans.pivot     = new Vector2(0.5f, 0.5f);
        this.HoleMaskPanel           = gameObject.AddComponent <Image>();
        UnityEngine.Object[] array = assetBundle.LoadAll(typeof(Sprite));
        for (int j = 0; j < array.Length; j++)
        {
            if (array[j].name == "UI_new_mask_01")
            {
                this.HoleMaskPanel.sprite = (array[j] as Sprite);
            }
        }
        Material material = new Material(shader2);

        material.renderQueue        = 3000;
        material.mainTexture        = this.HoleMaskPanel.sprite.texture;
        this.HoleMaskPanel.type     = Image.Type.Sliced;
        this.HoleMaskPanel.material = material;
        gameObject.transform.SetParent(base.transform);
        gameObject.transform.localScale    = Vector3.one;
        gameObject.transform.localPosition = Vector3.zero;
        gameObject.SetActive(false);
        for (int k = 0; k < 5; k++)
        {
            GameObject gameObject2 = UnityEngine.Object.Instantiate(gameObject) as GameObject;
            gameObject2.transform.SetParent(base.transform);
            gameObject2.transform.localScale         = Vector3.one;
            gameObject2.transform.localPosition      = Vector3.zero;
            this.OtherHoles[k].HoleMaskRectTransform = (gameObject2.transform as RectTransform);
        }
        gameObject = new GameObject("BlackPanel");
        RectTransform rectTransform = gameObject.AddComponent <RectTransform>();

        rectTransform.anchorMin = Vector2.zero;
        rectTransform.anchorMax = Vector2.zero;
        rectTransform.pivot     = new Vector2(0.25f, 0.25f);
        Vector2 vector = GUIManager.Instance.m_UICanvas.gameObject.GetComponent <RectTransform>().sizeDelta * 2f;

        rectTransform.sizeDelta = new Vector2(vector.x, vector.y);
        this.BlackPanel         = gameObject.AddComponent <Image>();
        this.BlackPanel.sprite  = Sprite.Create(this.Black, new Rect(0f, 0f, 1f, 1f), new Vector2(0f, 0f));
        material                 = new Material(shader);
        material.renderQueue     = 3000;
        material.mainTexture     = this.Black;
        this.BlackPanel.material = material;
        gameObject.transform.SetParent(base.transform);
        gameObject.transform.localScale    = Vector3.one;
        gameObject.transform.localPosition = Vector3.zero;
        gameObject.SetActive(false);
        gameObject                   = new GameObject("HolePanel");
        this.HoleTrans               = gameObject.AddComponent <RectTransform>();
        this.HoleTrans.anchorMin     = Vector2.zero;
        this.HoleTrans.anchorMax     = Vector2.zero;
        this.HoleTrans.pivot         = new Vector2(0.5f, 0.5f);
        this.HoleBtn                 = gameObject.AddComponent <UIHIBtn>();
        this.HoleBtn.m_BtnID1        = 0;
        this.HoleBtn.m_Handler       = this;
        this.HoleBtn.m_UpDownHandler = this;
        this.HoleBtn.m_DHandler      = this;
        this.HolePanel               = gameObject.AddComponent <Image>();
        for (int l = 0; l < array.Length; l++)
        {
            if (array[l].name == "UI_new_frame_01")
            {
                this.HolePanel.sprite = (array[l] as Sprite);
            }
        }
        this.HolePanel.type     = Image.Type.Sliced;
        this.HolePanel.material = this.ShareMat;
        gameObject.transform.SetParent(base.transform);
        gameObject.transform.localScale    = Vector3.one;
        gameObject.transform.localPosition = Vector3.zero;
        gameObject.SetActive(false);
        for (int m = 0; m < 5; m++)
        {
            GameObject gameObject3 = UnityEngine.Object.Instantiate(gameObject) as GameObject;
            UIHIBtn    component   = gameObject3.GetComponent <UIHIBtn>();
            component.m_Handler = this;
            gameObject3.transform.SetParent(base.transform);
            gameObject3.transform.localScale    = Vector3.one;
            gameObject3.transform.localPosition = Vector3.zero;
            this.OtherHoles[m].rectTransform    = (gameObject3.transform as RectTransform);
            this.OtherHoles[m].button           = gameObject3.GetComponent <UIHIBtn>();
            this.OtherHoles[m].button.m_BtnID1  = m + 1;
            this.OtherHoles[m].image            = gameObject3.GetComponent <Image>();
        }
        gameObject                = new GameObject("Dir");
        this.ArrowTrans           = gameObject.AddComponent <RectTransform>();
        this.ArrowTrans.anchorMin = Vector2.zero;
        this.ArrowTrans.anchorMax = Vector2.zero;
        this.ArrowTrans.pivot     = new Vector2(0.5f, 0.5f);
        this.ArrowTrans.sizeDelta = new Vector2(98f, 71f);
        this.Arrow                = gameObject.AddComponent <Image>();
        for (int n = 0; n < array.Length; n++)
        {
            if (array[n].name == "UI_new_arrow_01")
            {
                this.Arrow.sprite = (array[n] as Sprite);
            }
        }
        this.Arrow.material = this.ShareMat;
        gameObject.transform.SetParent(base.transform);
        gameObject.transform.localScale    = Vector3.one;
        gameObject.transform.localPosition = Vector3.zero;
        gameObject.SetActive(false);
        gameObject                  = new GameObject("TextBox");
        this.TextBoxTrans           = gameObject.AddComponent <RectTransform>();
        this.TextBoxTrans.anchorMin = Vector2.zero;
        this.TextBoxTrans.anchorMax = Vector2.zero;
        this.TextBoxTrans.pivot     = new Vector2(0.5f, 0.5f);
        this.TextBox                = gameObject.AddComponent <Image>();
        for (int num2 = 0; num2 < array.Length; num2++)
        {
            if (array[num2].name == "UI_new_box_02")
            {
                this.TextBox.sprite = (array[num2] as Sprite);
            }
        }
        this.TextBox.material = this.ShareMat;
        this.TextBox.type     = Image.Type.Sliced;
        gameObject.AddComponent <IgnoreRaycast>();
        gameObject.transform.SetParent(base.transform);
        gameObject.transform.localScale    = Vector3.one;
        gameObject.transform.localPosition = Vector3.zero;
        gameObject.SetActive(false);
        gameObject                  = new GameObject("Text");
        this.TextTrans              = gameObject.AddComponent <RectTransform>();
        this.TextTrans.anchorMin    = new Vector2(0.5f, 0f);
        this.TextTrans.anchorMax    = new Vector2(0.5f, 0f);
        this.TextTrans.pivot        = new Vector2(0.5f, 0f);
        this.m_Text                 = gameObject.AddComponent <UIText>();
        this.m_Text.font            = GUIManager.Instance.GetTTFFont();
        this.m_Text.color           = Color.black;
        this.m_Text.fontSize        = 24;
        this.m_Text.alignment       = TextAnchor.MiddleLeft;
        this.m_Text.supportRichText = true;
        gameObject.AddComponent <IgnoreRaycast>();
        gameObject.transform.SetParent(this.TextBoxTrans);
        gameObject.transform.localScale    = Vector3.one;
        gameObject.transform.localPosition = Vector3.zero;
        this.TextTrans.anchoredPosition    = new Vector2(0f, 0f);
        for (int num3 = 0; num3 < 3; num3++)
        {
            gameObject = new GameObject("TextEx");
            this.m_TextExTrans[num3]           = gameObject.AddComponent <RectTransform>();
            this.m_TextExTrans[num3].anchorMin = Vector2.zero;
            this.m_TextExTrans[num3].anchorMax = Vector2.zero;
            this.m_TextExTrans[num3].pivot     = new Vector2(0.5f, 0.5f);
            this.m_TextEx[num3]           = gameObject.AddComponent <UIText>();
            this.m_TextEx[num3].font      = GUIManager.Instance.GetTTFFont();
            this.m_TextEx[num3].color     = Color.black;
            this.m_TextEx[num3].fontSize  = 17;
            this.m_TextEx[num3].alignment = TextAnchor.MiddleCenter;
            gameObject.AddComponent <IgnoreRaycast>();
            gameObject.transform.SetParent(this.TextBoxTrans);
            gameObject.transform.localScale           = Vector3.one;
            gameObject.transform.localPosition        = Vector3.zero;
            this.m_TextExTrans[num3].anchoredPosition = new Vector2(this.textPosX[num3], 30f);
            gameObject.SetActive(false);
        }
        for (int num4 = 0; num4 < 3; num4++)
        {
            gameObject = new GameObject("ImageEx");
            this.m_ImageExTrans[num4]           = gameObject.AddComponent <RectTransform>();
            this.m_ImageExTrans[num4].anchorMin = Vector2.zero;
            this.m_ImageExTrans[num4].anchorMax = Vector2.zero;
            this.m_ImageExTrans[num4].pivot     = new Vector2(0.5f, 0.5f);
            this.m_ImageEx[num4] = gameObject.AddComponent <Image>();
            gameObject.AddComponent <IgnoreRaycast>();
            gameObject.transform.SetParent(this.TextBoxTrans);
            gameObject.transform.localScale    = new Vector3(0.75f, 0.75f, 0.75f);
            gameObject.transform.localPosition = Vector3.zero;
            gameObject.SetActive(false);
        }
        Sprite sprite = null;

        for (int num5 = 0; num5 < array.Length; num5++)
        {
            if (array[num5].name == "UI_slide")
            {
                sprite = (array[num5] as Sprite);
                break;
            }
        }
        for (int num6 = 0; num6 < 5; num6++)
        {
            gameObject = new GameObject("Pointer");
            this.m_PointerTrans[num6]           = gameObject.AddComponent <RectTransform>();
            this.m_PointerTrans[num6].anchorMin = new Vector2(0.5f, 0f);
            this.m_PointerTrans[num6].anchorMax = new Vector2(0.5f, 0f);
            this.m_PointerTrans[num6].pivot     = new Vector2(0.5f, 0.5f);
            this.m_Pointer[num6]          = gameObject.AddComponent <Image>();
            this.m_Pointer[num6].material = this.ShareMat;
            this.m_Pointer[num6].sprite   = sprite;
            this.m_Pointer[num6].SetNativeSize();
            if (num6 > 0)
            {
                this.m_Pointer[num6].color = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, 0);
            }
            gameObject.AddComponent <IgnoreRaycast>();
            gameObject.transform.SetParent(base.transform);
            gameObject.transform.localScale    = Vector3.one;
            gameObject.transform.localPosition = Vector3.zero;
            gameObject.SetActive(false);
        }
        gameObject                     = new GameObject("StageDir");
        this.StageArrowTrans           = gameObject.AddComponent <RectTransform>();
        this.StageArrowTrans.anchorMin = Vector2.zero;
        this.StageArrowTrans.anchorMax = Vector2.zero;
        this.StageArrowTrans.pivot     = new Vector2(0.5f, 0.5f);
        this.StageArrowTrans.sizeDelta = new Vector2(98f, 71f);
        Image image = gameObject.AddComponent <Image>();

        image.sprite   = this.Arrow.sprite;
        image.material = new Material(this.ShareMat)
        {
            renderQueue = 2500
        };
        gameObject.transform.SetParent(GUIManager.Instance.m_BottomLayer);
        gameObject.transform.localScale    = Vector3.one;
        gameObject.transform.localPosition = Vector3.zero;
        gameObject.SetActive(false);
        gameObject       = new GameObject("CoordTester");
        this.CoordTester = gameObject.AddComponent <RectTransform>();
        this.CoordTester.SetParent(base.transform, true);
        this.CoordTester.anchorMax = Vector2.zero;
        this.CoordTester.anchorMin = Vector2.zero;
        this.CoordTester.pivot     = Vector2.one * 0.5f;
    }
예제 #26
0
 // Token: 0x06001F31 RID: 7985 RVA: 0x003BC040 File Offset: 0x003BA240
 public void OnHIButtonClick(UIHIBtn sender)
 {
     this.OnClick(sender.m_BtnID1, sender.m_BtnID2, sender.m_BtnID3, false);
 }
예제 #27
0
    // Token: 0x06001F52 RID: 8018 RVA: 0x003BE064 File Offset: 0x003BC264
    public override void OnOpen(int arg1, int arg2)
    {
        this.DM                = DataManager.Instance;
        this.GM                = GUIManager.Instance;
        this.TTF               = this.GM.GetTTFFont();
        this.m_door            = (this.GM.FindMenu(EGUIWindow.Door) as Door);
        this.m_SearchItem      = new SearchItemObj[7];
        this.m_TabType         = (eTabPanel)this.DM.mLastSearchPage;
        this.m_SearchTextStr   = StringManager.Instance.SpawnString(30);
        this.m_SearchTitleStr  = StringManager.Instance.SpawnString(100);
        this.m_EmptyMsgTextStr = StringManager.Instance.SpawnString(100);
        this.m_SPArray         = base.transform.GetComponent <UISpritesArray>();
        this.Title             = base.transform.GetChild(0).GetChild(4).GetChild(0).GetComponent <UIText>();
        this.Title.font        = this.TTF;
        Image component = base.transform.GetChild(7).GetComponent <Image>();

        component.sprite   = this.m_door.LoadSprite("UI_main_close_base");
        component.material = this.m_door.LoadMaterial();
        if (this.GM.bOpenOnIPhoneX && component)
        {
            component.enabled = false;
        }
        UIButton component2 = base.transform.GetChild(7).GetChild(0).GetComponent <UIButton>();

        component2.image.sprite   = this.m_door.LoadSprite("UI_main_close");
        component2.image.material = this.m_door.LoadMaterial();
        component2.m_BtnID1       = 999;
        component2.m_Handler      = this;
        this.m_InputField         = base.transform.GetChild(1).GetChild(0).GetComponent <UIEmojiInput>();
        this.m_InputField.onValueChange.AddListener(delegate(string input)
        {
            this.ValueChange(input);
        });
        this.m_InputField.onValidateInput = new UIEmojiInput.OnValidateInput(this.OnValidateInput);
        this.m_InputText[0]      = base.transform.GetChild(1).GetChild(0).GetChild(0).GetComponent <UIText>();
        this.m_InputText[0].font = this.TTF;
        this.m_InputText[0].text = this.DM.mStringTable.GetStringByID(4718u);
        this.m_InputText[1]      = base.transform.GetChild(1).GetChild(0).GetChild(1).GetComponent <UIText>();
        this.m_InputText[1].font = this.TTF;
        this.m_SearchPanel       = base.transform.GetChild(1);
        this.m_TextStr[0]        = base.transform.GetChild(1).GetChild(3).GetComponent <UIText>();
        this.m_TextStr[0].font   = this.TTF;
        this.m_SearchTitleStr.StringToFormat(this.DM.mStringTable.GetStringByID(4717u));
        this.m_SearchTitleStr.AppendFormat("{0}");
        this.m_TextStr[0].text       = this.m_SearchTitleStr.ToString();
        this.m_TextStr[1]            = base.transform.GetChild(1).GetChild(4).GetComponent <UIText>();
        this.m_TextStr[1].font       = this.TTF;
        this.m_TextStr[1].text       = this.DM.mStringTable.GetStringByID(7056u);
        this.m_SearchText            = base.transform.GetChild(1).GetChild(5).GetComponent <UIText>();
        this.m_SearchText.font       = this.TTF;
        component2                   = base.transform.GetChild(1).GetChild(1).GetComponent <UIButton>();
        component2.m_Handler         = this;
        component2.m_BtnID1          = 998;
        this.m_CancelInput           = base.transform.GetChild(1).GetChild(2).GetComponent <UIButton>();
        this.m_CancelInput.m_Handler = this;
        this.m_CancelInput.m_BtnID1  = 997;
        this.m_EmptyMsgPanel         = base.transform.GetChild(6);
        this.m_EmptyMsgText          = this.m_EmptyMsgPanel.GetChild(1).GetComponent <UIText>();
        this.m_EmptyMsgText.font     = this.TTF;
        this.SetEmptyMsgPanel(eMsgPanel.PlzInputName);
        UIHIBtn component3 = base.transform.GetChild(3).GetChild(2).GetComponent <UIHIBtn>();

        this.GM.InitianHeroItemImg(component3.transform, eHeroOrItem.Hero, 0, 11, 0, 0, false, false, true, false);
        this.btn_Text        = base.transform.GetChild(3).GetChild(8).GetChild(0).GetComponent <UIText>();
        this.btn_Text.font   = this.TTF;
        this.btn_Text.text   = this.DM.mStringTable.GetStringByID(4634u);
        component2           = base.transform.GetChild(4).GetChild(0).GetComponent <UIButton>();
        component2.m_Handler = this;
        component2.m_BtnID1  = 996;
        this.m_TabBg1        = base.transform.GetChild(4).GetChild(0).GetComponent <Image>();
        this.m_TabIcon1      = base.transform.GetChild(4).GetChild(0).GetChild(1).GetComponent <Image>();
        this.m_TweenA1       = base.transform.GetChild(4).GetChild(0).GetChild(0);
        component2           = base.transform.GetChild(4).GetChild(1).GetComponent <UIButton>();
        component2.m_Handler = this;
        component2.m_BtnID1  = 995;
        this.m_TabBg2        = base.transform.GetChild(4).GetChild(1).GetComponent <Image>();
        this.m_TabIcon2      = base.transform.GetChild(4).GetChild(1).GetChild(1).GetComponent <Image>();
        this.m_TweenA2       = base.transform.GetChild(4).GetChild(1).GetChild(0);
        this.m_ScrollPanel   = base.transform.GetChild(2).GetComponent <ScrollPanel>();
        List <float> list = new List <float>();

        for (int i = 0; i < (int)this.DM.m_RecvSearchPlayerCount; i++)
        {
            list.Add(72f);
        }
        this.m_ScrollPanel.IntiScrollPanel(417f, 0f, 0f, list, 7, this);
        this.m_ScrollContentRT = this.m_ScrollPanel.transform.GetChild(0).GetComponent <RectTransform>();
        this.cScrollRect       = this.m_ScrollPanel.GetComponent <CScrollRect>();
        if (!this.DM.bClaerSearchData)
        {
            if (this.DM.m_RecvSearchPlayerCount > 0)
            {
                this.m_ScrollPanel.GoTo(this.DM.m_SearchListScrollIndex, this.DM.m_SearchListScrollPos);
                this.m_InputField.text = string.Empty;
                this.m_InputField.text = this.DM.m_PreSearchName;
                this.SetSearchText(true);
            }
            else
            {
                this.SetSearchText(false);
            }
        }
        this.SetAlliancePanel();
        this.SetTabPanel(this.m_TabType);
        GUIManager.Instance.UpdateUI(EGUIWindow.Door, 1, 2);
    }
예제 #28
0
 // Token: 0x06002B1C RID: 11036 RVA: 0x00471484 File Offset: 0x0046F684
 public virtual void OnHIButtonClick(UIHIBtn sender)
 {
 }
예제 #29
0
    // Token: 0x06001F09 RID: 7945 RVA: 0x003B7E80 File Offset: 0x003B6080
    public override void OnOpen(int arg1, int arg2)
    {
        this.GM   = GUIManager.Instance;
        this.DM   = DataManager.Instance;
        this.door = (GUIManager.Instance.FindMenu(EGUIWindow.Door) as Door);
        this.TTF  = this.GM.GetTTFFont();
        GUIManager.Instance.AddSpriteAsset("UI_frame");
        this.DM.SetSortNonFightHeroID();
        this.DM.SetSortFightHeroID();
        this.m_SpriteStr         = StringManager.Instance.SpawnString(30);
        this.m_OriginaArmyNumStr = StringManager.Instance.SpawnString(30);
        this.m_ChangeArmyNumStr  = StringManager.Instance.SpawnString(30);
        this.m_HeroMaxNumStr     = StringManager.Instance.SpawnString(30);
        this.m_SkillInfoStr      = new CString[4];
        for (int i = 0; i < this.m_SkillInfoStr.Length; i++)
        {
            this.m_SkillInfoStr[i] = StringManager.Instance.SpawnString(30);
        }
        this.m_Data      = new List <SoldierScrollItem>();
        this.m_ScrollObj = new ScrollPanelObject[8];
        for (int j = 0; j < 8; j++)
        {
            this.m_ScrollObj[j].PanelItem = new SoldierPanelObject[2];
        }
        this.m_SpritesArray = base.transform.GetComponent <UISpritesArray>();
        Image component = base.transform.GetChild(8).GetComponent <Image>();

        component.sprite   = this.door.LoadSprite("UI_main_close_base");
        component.material = this.door.LoadMaterial();
        if (GUIManager.Instance.bOpenOnIPhoneX && component)
        {
            component.enabled = false;
        }
        component          = base.transform.GetChild(8).GetChild(0).GetComponent <Image>();
        component.sprite   = this.door.LoadSprite("UI_main_close");
        component.material = this.door.LoadMaterial();
        UIButton component2 = base.transform.GetChild(8).GetChild(0).GetComponent <UIButton>();

        component2.m_Handler                 = this;
        component2.m_BtnID1                  = 999;
        this.m_tmptext[this.mTextCount]      = base.transform.GetChild(0).GetChild(2).GetChild(1).GetComponent <UIText>();
        this.m_tmptext[this.mTextCount].font = this.TTF;
        this.m_tmptext[this.mTextCount].text = this.DM.mStringTable.GetStringByID(731u);
        this.mTextCount++;
        this.m_tmptext[this.mTextCount]      = base.transform.GetChild(0).GetChild(3).GetChild(2).GetComponent <UIText>();
        this.m_tmptext[this.mTextCount].font = this.TTF;
        this.m_tmptext[this.mTextCount].text = this.DM.mStringTable.GetStringByID(733u);
        this.mTextCount++;
        this.m_tmptext[this.mTextCount]      = base.transform.GetChild(0).GetChild(8).GetComponent <UIText>();
        this.m_tmptext[this.mTextCount].font = this.TTF;
        this.m_tmptext[this.mTextCount].text = this.DM.mStringTable.GetStringByID(730u);
        this.mTextCount++;
        component2                           = base.transform.GetChild(7).GetComponent <UIButton>();
        component2.m_Handler                 = this;
        component2.m_BtnID1                  = 998;
        this.m_tmptext[this.mTextCount]      = base.transform.GetChild(7).GetChild(0).GetComponent <UIText>();
        this.m_tmptext[this.mTextCount].font = this.TTF;
        this.m_tmptext[this.mTextCount].text = this.DM.mStringTable.GetStringByID(189u);
        this.mTextCount++;
        this.m_OriginaHIBtn = base.transform.GetChild(1).GetChild(0).GetComponent <UIHIBtn>();
        this.GM.InitianHeroItemImg(this.m_OriginaHIBtn.transform, eHeroOrItem.Hero, 1, 1, 1, 1, true, false, true, false);
        this.m_ChangeHIBtn = base.transform.GetChild(2).GetChild(0).GetComponent <UIHIBtn>();
        this.GM.InitianHeroItemImg(this.m_ChangeHIBtn.transform, eHeroOrItem.Hero, 1, 1, 1, 1, true, false, true, false);
        this.m_OriginaIcon1            = base.transform.GetChild(1).GetChild(1).GetComponent <Image>();
        this.m_OriginaIcon2            = base.transform.GetChild(1).GetChild(2).GetComponent <Image>();
        this.m_OriginaName             = base.transform.GetChild(1).GetChild(3).GetComponent <UIText>();
        this.m_OriginaName.font        = this.TTF;
        this.m_OriginaArmyText         = base.transform.GetChild(1).GetChild(4).GetComponent <UIText>();
        this.m_OriginaArmyText.font    = this.TTF;
        this.m_OriginaArmyNumText      = base.transform.GetChild(1).GetChild(5).GetComponent <UIText>();
        this.m_OriginaArmyNumText.font = this.TTF;
        this.m_ChangeIcon1             = base.transform.GetChild(2).GetChild(1).GetComponent <Image>();
        this.m_ChangeIcon2             = base.transform.GetChild(2).GetChild(2).GetComponent <Image>();
        this.m_ChangeName             = base.transform.GetChild(2).GetChild(3).GetComponent <UIText>();
        this.m_ChangeName.font        = this.TTF;
        this.m_ChangeArmyText         = base.transform.GetChild(2).GetChild(4).GetComponent <UIText>();
        this.m_ChangeArmyText.font    = this.TTF;
        this.m_ChangeArmyNumText      = base.transform.GetChild(2).GetChild(5).GetComponent <UIText>();
        this.m_ChangeArmyNumText.font = this.TTF;
        UIHIBtn component3 = base.transform.GetChild(6).GetChild(0).GetChild(0).GetChild(0).GetComponent <UIHIBtn>();

        this.GM.InitianHeroItemImg(component3.transform, eHeroOrItem.Hero, 1, 0, 0, 0, true, false, true, false);
        component3 = base.transform.GetChild(6).GetChild(0).GetChild(1).GetChild(0).GetComponent <UIHIBtn>();
        this.GM.InitianHeroItemImg(component3.transform, eHeroOrItem.Hero, 1, 0, 0, 0, true, false, true, false);
        this.m_tmptext[this.mTextCount]      = base.transform.GetChild(6).GetChild(0).GetChild(0).GetChild(3).GetComponent <UIText>();
        this.m_tmptext[this.mTextCount].font = this.TTF;
        this.mTextCount++;
        this.m_tmptext[this.mTextCount]      = base.transform.GetChild(6).GetChild(0).GetChild(0).GetChild(4).GetComponent <UIText>();
        this.m_tmptext[this.mTextCount].font = this.TTF;
        this.mTextCount++;
        this.m_tmptext[this.mTextCount]      = base.transform.GetChild(6).GetChild(0).GetChild(1).GetChild(3).GetComponent <UIText>();
        this.m_tmptext[this.mTextCount].font = this.TTF;
        this.mTextCount++;
        this.m_tmptext[this.mTextCount]      = base.transform.GetChild(6).GetChild(0).GetChild(1).GetChild(4).GetComponent <UIText>();
        this.m_tmptext[this.mTextCount].font = this.TTF;
        this.mTextCount++;
        this.m_tmptext[this.mTextCount]      = base.transform.GetChild(6).GetChild(0).GetChild(2).GetChild(0).GetComponent <UIText>();
        this.m_tmptext[this.mTextCount].font = this.TTF;
        this.m_tmptext[this.mTextCount].text = this.DM.mStringTable.GetStringByID(341u);
        this.mTextCount++;
        if (GUIManager.Instance.IsArabic)
        {
            RectTransform rectTransform = base.transform.GetChild(6).GetChild(0).GetChild(0).GetChild(7).GetComponent <Image>().rectTransform;
            Vector3       localScale    = rectTransform.localScale;
            localScale.x             = -1f;
            rectTransform.localScale = localScale;
            rectTransform            = base.transform.GetChild(6).GetChild(0).GetChild(1).GetChild(7).GetComponent <Image>().rectTransform;
            localScale               = rectTransform.localScale;
            localScale.x             = -1f;
            rectTransform.localScale = localScale;
        }
        this.m_SkillHintPanel = base.transform.GetChild(9);
        this.m_HeroIcon       = this.m_SkillHintPanel.GetChild(0).GetChild(1).GetComponent <UIHIBtn>();
        this.GM.InitianHeroItemImg(this.m_HeroIcon.transform, eHeroOrItem.Hero, 0, 0, 0, 0, true, false, true, false);
        this.m_HeroNameText             = this.m_SkillHintPanel.GetChild(0).GetChild(3).GetComponent <UIText>();
        this.m_HeroNameText.font        = this.TTF;
        this.m_HeroArmsText             = this.m_SkillHintPanel.GetChild(0).GetChild(4).GetComponent <UIText>();
        this.m_HeroArmsText.font        = this.TTF;
        this.m_HeroMaxNum               = this.m_SkillHintPanel.GetChild(0).GetChild(5).GetComponent <UIText>();
        this.m_HeroMaxNum.font          = this.TTF;
        this.m_HeroEnhanceIcon          = this.m_SkillHintPanel.GetChild(0).GetChild(2).GetComponent <Image>();
        this.m_HeroEnhanceIcon.material = this.GetEnhanceMat();
        this.m_SkillImage               = new Image[4];
        this.m_SkillFrame               = new Image[4];
        this.m_SkillMaskTf              = new Transform[4];
        this.m_SkliiNameText            = new UIText[4];
        this.m_SkillInfoText            = new UIText[4];
        for (int k = 0; k < 4; k++)
        {
            Transform child = this.m_SkillHintPanel.GetChild(k + 1);
            this.m_SkillImage[k]         = child.GetChild(1).GetComponent <Image>();
            this.m_SkillFrame[k]         = this.m_SkillHintPanel.GetChild(k + 1).GetChild(1).GetChild(0).GetComponent <Image>();
            this.m_SkliiNameText[k]      = this.m_SkillHintPanel.GetChild(k + 1).GetChild(2).GetComponent <UIText>();
            this.m_SkliiNameText[k].font = this.TTF;
            this.m_SkillInfoText[k]      = this.m_SkillHintPanel.GetChild(k + 1).GetChild(3).GetComponent <UIText>();
            this.m_SkillInfoText[k].font = this.TTF;
            this.m_SkillMaskTf[k]        = this.m_SkillHintPanel.GetChild(k + 1).GetChild(4);
        }
        this.SetData(0);
        this.m_ScrollPanel = base.transform.GetChild(4).GetComponent <ScrollPanel>();
        List <float> list = new List <float>();

        for (int l = 0; l < this.m_Data.Count; l++)
        {
            list.Add(this.m_Data[l].Height);
        }
        this.m_ScrollPanel.IntiScrollPanel(497f, 10f, 6f, list, 8, this);
        UIButtonHint.scrollRect = this.m_ScrollPanel.GetComponent <CScrollRect>();
        this.SetChangeLord(0, 0, 0, 0, 0, 0);
        GUIManager.Instance.UpdateUI(EGUIWindow.Door, 1, 2);
    }
예제 #30
0
파일: UIAmbush.cs 프로젝트: gsoec/lm-source
 // Token: 0x06001092 RID: 4242 RVA: 0x001D7164 File Offset: 0x001D5364
 public void OnHIButtonClick(UIHIBtn sender)
 {
     this.m_Door.GoToPointCode(DataManager.MapDataController.OtherKingdomData.kingdomID, this.AM.m_AmbushPlayerCapitalPos.zoneID, this.AM.m_AmbushPlayerCapitalPos.pointID, 0);
 }