예제 #1
0
    private void DisplayItemDetail(Transform item, ListDataTypeBase data, Int32 index, Boolean isInit)
    {
        FieldItemListData fieldItemListData = (FieldItemListData)data;
        ItemDetailHUD     itemDetailHud     = new ItemDetailHUD(item.gameObject);

        if (isInit)
        {
            UIEventListener uiEventListener = UIEventListener.Get(itemDetailHud.ManualButton.gameObject);
            uiEventListener.Select += itemDetailHud.Self.GetComponent <ScrollItemKeyNavigation>().OnOtherObjectSelect;
            DisplayWindowBackground(item.gameObject, null);
        }
        if (ButtonGroupState.ActiveGroup == ItemArrangeGroupButton)
        {
            if (_currentItemIndex == index && !_switchingItem)
            {
                if (isInit)
                {
                    ButtonGroupState.HoldActiveStateOnGroup(item.gameObject, ItemGroupButton);
                }
                ButtonGroupState.SetButtonAnimation(item.gameObject, false);
                ButtonGroupState.SetOutsideLimitRectBehavior(PointerManager.LimitRectBehavior.Hide, ItemGroupButton);
            }
            else
            {
                ButtonGroupState.SetButtonAnimation(item.gameObject, true);
            }
        }
        FF9UIDataTool.DisplayItem(fieldItemListData.ItemId, itemDetailHud.IconSprite, itemDetailHud.NameLabel, fieldItemListData.Enable);
        itemDetailHud.NumberLabel.text         = fieldItemListData.ItemCount.ToString();
        itemDetailHud.NumberLabel.color        = !fieldItemListData.Enable ? FF9TextTool.Gray : FF9TextTool.White;
        itemDetailHud.Button.Help.Enable       = true;
        itemDetailHud.Button.Help.Text         = FF9TextTool.ItemHelpDescription(fieldItemListData.ItemId);
        itemDetailHud.ManualButton.Help.Enable = true;
        itemDetailHud.ManualButton.Help.Text   = FF9TextTool.ItemHelpDescription(fieldItemListData.ItemId);
    }
예제 #2
0
    private IEnumerator OnFinishedLoadPreview_delay(DataSerializerErrorCode errNo, Int32 slotID, List <SharedDataPreviewSlot> data)
    {
        Single remainTime = Mathf.Max(2f - (Time.time - this.timeCounter), 0f);

        yield return(new WaitForSeconds(remainTime));

        base.Loading = false;
        if (errNo == DataSerializerErrorCode.Success)
        {
            FF9Sfx.FF9SFX_Play(1044);
            this.LoadingPreviewDialog.SetActive(false);
            if (this.type == SaveLoadUI.SerializeType.Load)
            {
                Boolean isNodata = true;
                foreach (SharedDataPreviewSlot slot in data)
                {
                    if (slot != null)
                    {
                        isNodata = false;
                        break;
                    }
                }
                if (isNodata)
                {
                    this.DisplayNoSaveFoundDialog();
                    FF9UIDataTool.DisplayTextLocalize(this.HelpTitleLabel, "SaveHelpSlot");
                    yield break;
                }
            }
            else if (data == null)
            {
                data = new List <SharedDataPreviewSlot>();
                for (Int32 index = 0; index < 15; index++)
                {
                    data.Add((SharedDataPreviewSlot)null);
                }
            }
            ButtonGroupState.MuteActiveSound = true;
            base.Loading = true;
            base.FadingComponent.FadePingPong(delegate
            {
                this.SlotListPanel.SetActive(false);
                this.FileListPanel.SetActive(true);
                FF9UIDataTool.DisplayTextLocalize(this.HelpTitleLabel, "SaveHelpBlock");
                this.DisplayFile(data);
            }, delegate
            {
                ButtonGroupState.MuteActiveSound = false;
                this.Loading = false;
            });
            yield break;
        }
        FF9Sfx.FF9SFX_Play(1046);
        global::Debug.Log("DISPLAYING CORRUPT DIALOG 1");
        FF9UIDataTool.DisplayTextLocalize(this.HelpTitleLabel, "SaveHelpSlot");
        this.LoadingPreviewDialog.SetActive(false);
        this.DisplayCorruptAccessDialog(SaveLoadUI.SlotGroupButton, SaveLoadUI.SerializeType.Load, errNo);
        this.slotNameLabelList[slotID].color = FF9TextTool.Red;
        yield break;
    }
예제 #3
0
    private void DisplayCharacterPartyAvatar(Byte id, PLAYER player, UISprite avatarSprite, UISprite[] avatarStatusAlignment)
    {
        FF9UIDataTool.DisplayCharacterAvatar(player, default(Vector3), default(Vector3), avatarSprite, false);
        avatarSprite.alpha = ((!this.info.fix[id]) ? 1f : 0.5f);
        for (Int32 i = 0; i < avatarStatusAlignment.Length; i++)
        {
            UISprite uISprite = avatarStatusAlignment[i];
            uISprite.alpha = 0f;
        }
        Int32 num = 0;

        if ((player.status & 2) != 0)
        {
            avatarStatusAlignment[num].spriteName = Localization.Get("PartyStatusTextPoison");
            avatarStatusAlignment[num].alpha      = 1f;
            num++;
        }
        if ((player.status & 1) != 0)
        {
            avatarStatusAlignment[num].spriteName = Localization.Get("PartyStatusTextStone");
            avatarStatusAlignment[num].alpha      = 1f;
            num++;
        }
        if (player.cur.hp == 0)
        {
            avatarStatusAlignment[num].spriteName = "text_ko";
            avatarStatusAlignment[num].alpha      = 1f;
            num++;
        }
    }
예제 #4
0
    private IEnumerator OnFinishedSaveFile_delay(DataSerializerErrorCode errNo, Int32 slotID, Int32 saveID, Boolean isSuccess, SharedDataPreviewSlot data)
    {
        Single remainTime = Mathf.Max(2f - (Time.time - this.timeCounter), 0f);

        yield return(new WaitForSeconds(remainTime));

        this.progressBar.value = 1f;
        yield return(new WaitForSeconds(0.1f));

        base.Loading = false;
        this.LoadingAccessPanel.SetActive(false);
        if (isSuccess && errNo == DataSerializerErrorCode.Success)
        {
            FF9Sfx.FF9SFX_Play(1261);
            this.isFileExistList[this.currentFile] = true;
            this.isFileCorrupt[this.currentFile]   = false;
            this.DisplayFileInfo(this.currentFile, data);
            this.DisplaySuccessfulAccessDialog();
        }
        else
        {
            FF9Sfx.FF9SFX_Play(1046);
            global::Debug.Log("DISPLAYING CORRUPT DIALOG 2");
            FF9UIDataTool.DisplayTextLocalize(this.HelpTitleLabel, "SaveHelpBlock");
            global::Debug.LogError("Cannot save file");
            this.DisplayCorruptAccessDialog(SaveLoadUI.FileGroupButton, SaveLoadUI.SerializeType.Save, errNo);
            this.isFileCorrupt[saveID] = true;
        }
        yield break;
    }
예제 #5
0
파일: StatusUI.cs 프로젝트: ArtReeX/memoria
    public override Boolean OnKeyRightBumper(GameObject go)
    {
        if (!base.OnKeyRightBumper(go) || !CharacterArrowPanel.activeSelf)
        {
            return(true);
        }

        FF9Sfx.FF9SFX_Play(1047);
        Int32 next = ff9play.FF9Play_GetNext(_currentPartyIndex);

        if (next == _currentPartyIndex)
        {
            return(true);
        }

        _currentPartyIndex = next;
        PLAYER player    = FF9StateSystem.Common.FF9.party.member[this._currentPartyIndex];
        String spritName = FF9UIDataTool.AvatarSpriteName(player.info.serial_no);

        Loading = true;
        Boolean isKnockOut = player.cur.hp == 0;

        _avatarTransition.Change(spritName, HonoAvatarTweenPosition.Direction.RightToLeft, isKnockOut, () =>
        {
            DisplayPlayer(true);
            Loading = false;
        });

        DisplayAllCharacterInfo(false);
        return(true);
    }
예제 #6
0
    private void DisplayCardDetail()
    {
        Int32 num = (Int32)this.count[this.currentCardId];

        if (num > 0)
        {
            this.cardInfoContentGameObject.SetActive(true);
            this.ShowCardDetailHudAmount(num);
            this.cardIdLabel.text = "No" + (this.currentCardId + 1).ToString("0#");
            FF9UIDataTool.DisplayCard(this.GetCardInfo(this.currentCardId, this.currentCardOffset), this.cardDetailHudList[0], false);
            this.cardNameLabel.text = FF9TextTool.CardName(this.currentCardId);
            if (num > 1)
            {
                this.cardNumberGameObject.SetActive(true);
                this.currentCardNumberLabel.text = (this.currentCardOffset + 1).ToString();
                this.totalCardNumberLabel.text   = num.ToString();
                for (Int32 i = 1; i < Math.Min(num, 5); i++)
                {
                    FF9UIDataTool.DisplayCard(this.GetCardInfo(this.currentCardId, 0), this.cardDetailHudList[i], true);
                }
            }
            else
            {
                this.cardNumberGameObject.SetActive(false);
            }
        }
        else
        {
            this.cardInfoContentGameObject.SetActive(false);
        }
    }
예제 #7
0
 private void DisplayGilAndItemInfo()
 {
     this.EXPAndAPPhrasePanel.SetActive(false);
     this.GilAndItemPhrasePanel.SetActive(true);
     this.receiveGilLabel.text = (this.gilValue.value - this.gilValue.current).ToString() + "[YSUB=1.3][sub]G";
     this.currentGilLabel.text = Mathf.Min(FF9StateSystem.Common.FF9.party.gil, 9999999f).ToString() + "[YSUB=1.3][sub]G";
     FF9UIDataTool.DisplayTextLocalize(this.infoLabelGameObject, "BattleResultInfoGilItem");
     if (this.itemList.Count > 0)
     {
         this.ItemDetailPanel.SetActive(true);
         this.noItemLabel.SetActive(false);
         Int32 num = 0;
         foreach (FF9ITEM ff9ITEM in this.itemList)
         {
             ItemListDetailWithIconHUD itemListDetailWithIconHUD = this.itemHudList[num];
             itemListDetailWithIconHUD.Self.SetActive(true);
             FF9UIDataTool.DisplayItem((Int32)ff9ITEM.id, itemListDetailWithIconHUD.IconSprite, itemListDetailWithIconHUD.NameLabel, true);
             itemListDetailWithIconHUD.NumberLabel.text = ff9ITEM.count.ToString();
             num++;
         }
     }
     else
     {
         this.ItemDetailPanel.SetActive(false);
         this.noItemLabel.SetActive(true);
     }
     if (this.defaultCard != 255)
     {
         this.ItemDetailPanel.SetActive(true);
         this.cardHud.Self.SetActive(true);
         this.cardHud.NameLabel.text = FF9TextTool.CardName(this.defaultCard);
     }
 }
예제 #8
0
파일: CardUI.cs 프로젝트: ArtReeX/memoria
    private void DisplayCardDetail()
    {
        Int32 num = (Int32)this.count[this.currentCardId];

        if (num > 0)
        {
            this.cardInfoContentGameObject.SetActive(true);
            this.ShowCardDetailHudNumber(num);
            FF9UIDataTool.DisplayCard(QuadMistDatabase.MiniGame_GetCardInfoPtr(this.currentCardId, this.offset[this.currentCardId]), this.cardDetailHudList[0], false);
            this.cardNameLabel.text = FF9TextTool.CardName(this.currentCardId);
            if (num > 1)
            {
                this.cardNumberGameObject.SetActive(true);
                this.currentCardNumberLabel.text = (this.offset[this.currentCardId] + 1).ToString();
                this.totalCardNumberLabel.text   = num.ToString();
                for (Int32 i = 1; i < Math.Min(num, 5); i++)
                {
                    FF9UIDataTool.DisplayCard(QuadMistDatabase.MiniGame_GetCardInfoPtr(this.currentCardId, 0), this.cardDetailHudList[i], true);
                }
            }
            else
            {
                this.cardNumberGameObject.SetActive(false);
            }
        }
        else
        {
            this.cardInfoContentGameObject.SetActive(false);
        }
    }
예제 #9
0
 private void DisplayEXPAndAPInfo()
 {
     this.EXPAndAPPhrasePanel.SetActive(true);
     this.GilAndItemPhrasePanel.SetActive(false);
     this.expReceiveLabel.text = this.defaultExp.ToString();
     this.apReceiveLabel.text  = this.defaultAp.ToString();
     FF9UIDataTool.DisplayTextLocalize(this.infoLabelGameObject, "BattleResultInfoEXPAP");
 }
예제 #10
0
 private void DisplaySuccessfulAccessDialog()
 {
     if (this.type == SaveLoadUI.SerializeType.Save)
     {
         this.SuccessfulAccessPanel.transform.position = this.fileInfoHudList[this.currentFile].Self.transform.position - new Vector3(0.8f, 0.05f);
         this.SuccessfulAccessPanel.SetActive(true);
         FF9UIDataTool.DisplayTextLocalize(this.successfulAccessGameObject, "SaveSuccess");
         base.Loading = true;
         base.StartCoroutine("HideSuccessfulAccessDialog");
     }
 }
예제 #11
0
파일: StatusUI.cs 프로젝트: ArtReeX/memoria
    private void DisplayPlayer(Boolean updateAvatar)
    {
        PLAYER player = FF9StateSystem.Common.FF9.party.member[_currentPartyIndex];

        FF9UIDataTool.DisplayCharacterDetail(player, _characterHud);
        if (!updateAvatar)
        {
            return;
        }

        FF9UIDataTool.DisplayCharacterAvatar(player, new Vector3(), new Vector3(), _characterHud.AvatarSprite, false);
    }
예제 #12
0
파일: StatusUI.cs 프로젝트: ArtReeX/memoria
    private void DrawAbilityInfo(AbilityItemHUD abilityHud, Int32 index)
    {
        PLAYER  player = FF9StateSystem.Common.FF9.party.member[_currentPartyIndex];
        Boolean flag   = ff9abil.FF9Abil_HasAp(new Character(player));

        if (flag && player.pa[index] == 0)
        {
            abilityHud.Self.SetActive(false);
            return;
        }

        Int32 index1 = ff9abil._FF9Abil_PaData[player.info.menu_type][index].Id;

        //int num1 = ff9abil._FF9Abil_PaData[player.info.menu_type][index].max_ap;
        if (index1 == 0)
        {
            abilityHud.Self.SetActive(false);
        }
        else
        {
            //int num2 = player.pa[index];
            String  str1;
            String  str2;
            Boolean isShowText;
            if (index1 < 192)
            {
                AA_DATA aaData = FF9StateSystem.Battle.FF9Battle.aa_data[index1];
                str1       = FF9TextTool.ActionAbilityName(index1);
                str2       = "ability_stone";
                isShowText = (aaData.Type & 2) == 0;
            }
            else
            {
                //SA_DATA saData = ff9abil._FF9Abil_SaData[index1 - 192];
                str1       = FF9TextTool.SupportAbilityName(index1 - 192);
                str2       = !ff9abil.FF9Abil_IsEnableSA(player.sa, index1) ? "skill_stone_off" : "skill_stone_on";
                isShowText = true;
            }
            abilityHud.Self.SetActive(true);
            abilityHud.IconSprite.spriteName = str2;
            abilityHud.NameLabel.text        = str1;

            if (flag)
            {
                FF9UIDataTool.DisplayAPBar(player, index1, isShowText, abilityHud.APBar);
            }
            else
            {
                FF9UIDataTool.DisplayAPBar(player, index1, isShowText, abilityHud.APBar);
            }
        }
    }
예제 #13
0
    private IEnumerator HideSuccessfulAccessDialog()
    {
        yield return(new WaitForSeconds(1.5f));

        this.SuccessfulAccessPanel.SetActive(false);
        FF9UIDataTool.DisplayTextLocalize(this.HelpTitleLabel, "SaveHelpBlock");
        if (this.type == SaveLoadUI.SerializeType.Save)
        {
            base.Loading = false;
            ButtonGroupState.ActiveGroup = SaveLoadUI.FileGroupButton;
        }
        yield break;
    }
예제 #14
0
파일: StatusUI.cs 프로젝트: ArtReeX/memoria
    private void DisplayAllCharacterInfo(Boolean updateAvatar)
    {
        PLAYER player = FF9StateSystem.Common.FF9.party.member[_currentPartyIndex];

        DisplayPlayer(updateAvatar);
        _parameterHud.SpeedLabel.text    = player.elem.dex.ToString();
        _parameterHud.StrengthLabel.text = player.elem.str.ToString();
        _parameterHud.MagicLabel.text    = player.elem.mgc.ToString();
        _parameterHud.SpiritLabel.text   = player.elem.wpr.ToString();
        _parameterHud.AttackLabel.text   = ff9weap.WeaponData[player.equip[0]].Ref.Power.ToString();
        _parameterHud.DefendLabel.text   = player.defence.PhisicalDefence.ToString();
        _parameterHud.EvadeLabel.text    = player.defence.PhisicalEvade.ToString();
        _parameterHud.MagicDefLabel.text = player.defence.MagicalDefence.ToString();
        _parameterHud.MagicEvaLabel.text = player.defence.MagicalEvade.ToString();

        UInt32 exp = player.level < 99 ? ff9level.CharacterLevelUps[player.level].ExperienceToLevel : player.exp;

        if (FF9StateSystem.EventState.gEventGlobal[16] != 0 && (player.category & 16) == 0)
        {
            _tranceGameObject.SetActive(true);
            _tranceSlider.value = player.trance / 256f;
        }
        else
        {
            _tranceGameObject.SetActive(false);
        }

        _expLabel.text    = player.exp.ToString();
        _nextLvLabel.text = (exp - player.exp).ToString();

        FF9UIDataTool.DisplayItem(player.equip[0], _equipmentHud.Weapon.IconSprite, _equipmentHud.Weapon.NameLabel, true);
        FF9UIDataTool.DisplayItem(player.equip[1], _equipmentHud.Head.IconSprite, _equipmentHud.Head.NameLabel, true);
        FF9UIDataTool.DisplayItem(player.equip[2], _equipmentHud.Wrist.IconSprite, _equipmentHud.Wrist.NameLabel, true);
        FF9UIDataTool.DisplayItem(player.equip[3], _equipmentHud.Body.IconSprite, _equipmentHud.Body.NameLabel, true);
        FF9UIDataTool.DisplayItem(player.equip[4], _equipmentHud.Accessory.IconSprite, _equipmentHud.Accessory.NameLabel, true);

        Byte presetId = FF9StateSystem.Common.FF9.party.member[_currentPartyIndex].info.menu_type;
        Byte command1 = (Byte)CharacterCommands.CommandSets[presetId].Regular1;
        Byte command2 = (Byte)CharacterCommands.CommandSets[presetId].Regular2;

        _attackLabel.text   = FF9TextTool.CommandName(1);
        _ability1Label.text = FF9TextTool.CommandName(command1);
        _ability2Label.text = FF9TextTool.CommandName(command2);
        _itemLabel.text     = FF9TextTool.CommandName(14);

        for (Int32 index = 0; index < _abilityHudList.Count; ++index)
        {
            DrawAbilityInfo(_abilityHudList[index], index);
        }
    }
예제 #15
0
 private void DisplayCharacterInfo()
 {
     for (Int32 i = 0; i < 4; i++)
     {
         PLAYER player = FF9StateSystem.Common.FF9.party.member[i];
         if (player != null)
         {
             UInt64 num = (player.level >= 99) ? player.exp : ff9level.CharacterLevelUps[player.level].ExperienceToLevel;
             BattleResultUI.CharacterBattleResultInfoHUD characterBattleResultInfoHUD = this.characterBRInfoHudList[i];
             characterBattleResultInfoHUD.Content.SetActive(true);
             characterBattleResultInfoHUD.NameLabel.text   = player.name;
             characterBattleResultInfoHUD.LevelLabel.text  = player.level.ToString();
             characterBattleResultInfoHUD.ExpLabel.text    = player.exp.ToString();
             characterBattleResultInfoHUD.NextLvLabel.text = (num - player.exp).ToString();
             FF9UIDataTool.DisplayCharacterAvatar(player, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), characterBattleResultInfoHUD.AvatarSprite, false);
             UISprite[] statusesSpriteList = characterBattleResultInfoHUD.StatusesSpriteList;
             for (Int32 j = 0; j < (Int32)statusesSpriteList.Length; j++)
             {
                 UISprite uisprite = statusesSpriteList[j];
                 uisprite.alpha = 0f;
             }
             Int32 num2 = 0;
             foreach (KeyValuePair <UInt32, Byte> keyValuePair in BattleResultUI.BadIconDict)
             {
                 if (((UInt32)player.status & keyValuePair.Key) != 0u)
                 {
                     characterBattleResultInfoHUD.StatusesSpriteList[num2].alpha      = 1f;
                     characterBattleResultInfoHUD.StatusesSpriteList[num2].spriteName = FF9UIDataTool.IconSpriteName[(Int32)keyValuePair.Value];
                     num2++;
                     if (num2 > (Int32)characterBattleResultInfoHUD.StatusesSpriteList.Length)
                     {
                         break;
                     }
                 }
             }
             if (!this.IsEnableDraw(player, i))
             {
                 this.isRecieveExpList.Add(false);
                 characterBattleResultInfoHUD.DimPanel.SetActive(true);
                 characterBattleResultInfoHUD.AvatarSprite.alpha = 0.5f;
             }
             else
             {
                 this.isRecieveExpList.Add(true);
                 characterBattleResultInfoHUD.DimPanel.SetActive(false);
                 characterBattleResultInfoHUD.AvatarSprite.alpha = 1f;
             }
         }
     }
 }
예제 #16
0
 private void DisplayCharacterInfo(Int32 charId)
 {
     if (charId != FF9PARTY_NONE)
     {
         PLAYER player = FF9StateSystem.Common.FF9.player[charId];
         this.currentCharacterHud.Content.SetActive(true);
         FF9UIDataTool.DisplayCharacterDetail(player, this.currentCharacterHud);
         this.DisplayCharacterPartyAvatar((Byte)charId, player, (UISprite)(Object)this.currentCharacterHud.AvatarSprite, this.currentCharacterHud.StatusesAvatar);
     }
     else
     {
         this.currentCharacterHud.Content.SetActive(false);
     }
 }
예제 #17
0
 private void setSerialzeType(SaveLoadUI.SerializeType serailizeType)
 {
     if (serailizeType != SaveLoadUI.SerializeType.Save)
     {
         if (serailizeType == SaveLoadUI.SerializeType.Load)
         {
             FF9UIDataTool.DisplayTextLocalize(this.SerailizeTitleLabel, "Load");
         }
     }
     else
     {
         FF9UIDataTool.DisplayTextLocalize(this.SerailizeTitleLabel, "Save");
     }
 }
예제 #18
0
    private void DisplaySlot()
    {
        Int32 num = 0;

        foreach (UILabel uilabel in this.slotNameLabelList)
        {
            uilabel.text  = String.Format(Localization.Get("SlotNo"), num + 1);
            uilabel.color = FF9TextTool.White;
            num++;
        }
        this.currentSlot        = FF9StateSystem.Settings.LatestSlot;
        this.helpSlotLabel.text = String.Format(Localization.Get("SlotNo"), this.currentSlot + 1);
        this.SlotListPanel.SetActive(true);
        this.FileListPanel.SetActive(false);
        FF9UIDataTool.DisplayTextLocalize(this.HelpTitleLabel, "SaveHelpSlot");
    }
예제 #19
0
    private void DisplayCharacter()
    {
        Int32 num = 0;

        Byte[] menu = this.info.menu;
        for (Int32 i = 0; i < menu.Length; i++)
        {
            Byte b = menu[i];
            CharacterDetailPartyHUD characterDetailPartyHUD = this.currentPartyHudList[num++];
            if (b != FF9PARTY_NONE)
            {
                PLAYER player = FF9StateSystem.Common.FF9.player[b];
                characterDetailPartyHUD.Self.SetActive(true);
                characterDetailPartyHUD.Content.SetActive(true);
                characterDetailPartyHUD.EmptyLabel.gameObject.SetActive(false);
                FF9UIDataTool.DisplayCharacterDetail(player, characterDetailPartyHUD);
                this.DisplayCharacterPartyAvatar(b, player, (UISprite)(Object)characterDetailPartyHUD.AvatarSprite, characterDetailPartyHUD.StatusesAvatar);
            }
            else
            {
                characterDetailPartyHUD.EmptyLabel.text = String.Format(Localization.Get("EmptyCharNumber"), num);
                characterDetailPartyHUD.Content.SetActive(false);
                characterDetailPartyHUD.EmptyLabel.gameObject.SetActive(true);
            }
        }
        num = 0;
        Byte[] select = this.info.select;
        for (Int32 j = 0; j < select.Length; j++)
        {
            Byte b2 = select[j];
            CharacterOutsidePartyHud characterOutsidePartyHud = this.outsidePartyHudList[num++];
            if (b2 != FF9PARTY_NONE)
            {
                PLAYER player2 = FF9StateSystem.Common.FF9.player[b2];
                this.DisplayCharacterPartyAvatar(b2, player2, characterOutsidePartyHud.Avatar, characterOutsidePartyHud.StatusesAvatar);
            }
            else
            {
                characterOutsidePartyHud.Avatar.alpha = 0f;
            }
        }
    }
예제 #20
0
	public GameObject InsertBitmapIcon(Dialog.DialogImage dialogImg, GameObject label)
	{
		GameObject gameObject;
		if (dialogImg.IsButton)
		{
			gameObject = FF9UIDataTool.ButtonGameObject((Control)dialogImg.Id, dialogImg.checkFromConfig, dialogImg.tag);
		}
		else
		{
			gameObject = FF9UIDataTool.IconGameObject(dialogImg.Id);
		}
		if (gameObject != (UnityEngine.Object)null)
		{
			gameObject.transform.parent = label.transform;
			gameObject.transform.localScale = Vector3.one;
			gameObject.transform.localPosition = new Vector3(dialogImg.LocalPosition.x, dialogImg.LocalPosition.y, 0f);
			gameObject.SetActive(true);
		}
		return gameObject;
	}
예제 #21
0
    private void DisplayTarget()
    {
        Int32 num = 0;

        foreach (PLAYER player in FF9StateSystem.Common.FF9.party.member)
        {
            CharacterDetailHUD targetHud = _targetHudList[num++];
            targetHud.Self.SetActive(true);
            if (player != null)
            {
                targetHud.Content.SetActive(true);
                FF9UIDataTool.DisplayCharacterDetail(player, targetHud);
                FF9UIDataTool.DisplayCharacterAvatar(player, new Vector2(), new Vector2(), targetHud.AvatarSprite, false);
                switch (ff9item._FF9Item_Info[_itemIdList[_currentItemIndex] - 224].info.DisplayStats)
                {
                case TargetDisplay.None:
                case TargetDisplay.Hp:
                case TargetDisplay.Mp:
                    targetHud.HPPanel.SetActive(true);
                    targetHud.MPPanel.SetActive(true);
                    targetHud.StatusesPanel.SetActive(false);
                    continue;

                case TargetDisplay.Debuffs:
                case TargetDisplay.Buffs:
                    targetHud.HPPanel.SetActive(false);
                    targetHud.MPPanel.SetActive(false);
                    targetHud.StatusesPanel.SetActive(true);
                    continue;

                default:
                    continue;
                }
            }
            else
            {
                targetHud.Content.SetActive(false);
            }
        }
        SetAvalableCharacter(false);
    }
예제 #22
0
    private void DisplayCharacter()
    {
        Int32 num = 0;

        PLAYER[] member = FF9StateSystem.Common.FF9.party.member;
        for (Int32 i = 0; i < (Int32)member.Length; i++)
        {
            PLAYER             player             = member[i];
            CharacterDetailHUD characterDetailHUD = this.CharacterHUDList[num++];
            characterDetailHUD.Self.SetActive(true);
            if (player != null)
            {
                characterDetailHUD.Content.SetActive(true);
                FF9UIDataTool.DisplayCharacterDetail(player, characterDetailHUD);
                FF9UIDataTool.DisplayCharacterAvatar(player, this.FrontRowPosition, this.BackRowPosition, characterDetailHUD.AvatarSprite, true);
            }
            else
            {
                characterDetailHUD.Content.SetActive(false);
            }
        }
    }
예제 #23
0
    private IEnumerator OnFinishedLoadFile_delay(DataSerializerErrorCode errNo, Int32 slotID, Int32 saveID, Boolean isSuccess)
    {
        Single remainTime = Mathf.Max(2f - (Time.time - this.timeCounter), 0f);

        yield return(new WaitForSeconds(remainTime));

        this.progressBar.value = 1f;
        yield return(new WaitForSeconds(0.1f));

        this.LoadingAccessPanel.SetActive(false);
        if (isSuccess && errNo == DataSerializerErrorCode.Success)
        {
            FF9Sfx.FF9SFX_Play(1261);
            this.Hide(delegate
            {
                SoundLib.StopMovieMusic("FMV000", true);
                this.Loading = true;
                FF9StateSystem.Settings.SetSound();
                FF9StateSystem.Settings.SetSoundEffect();
                EventEngine instance = PersistenSingleton <EventEngine> .Instance;
                instance.ReplaceLoadMap();
                PersistenSingleton <UIManager> .Instance.TitleScene.SplashScreenEnabled = true;
                AchievementManager.ResyncNormalAchievements();
                FF9StateSystem.Settings.UpdateSetting();
                ff9.w_frameNewSession();
                SceneDirector.FadeEventSetColor(FadeMode.Sub, Color.white);
            });
        }
        else
        {
            FF9Sfx.FF9SFX_Play(1046);
            FF9UIDataTool.DisplayTextLocalize(this.HelpTitleLabel, "SaveHelpBlock");
            global::Debug.LogError("Cannot load file");
            this.DisplayCorruptAccessDialog(SaveLoadUI.FileGroupButton, SaveLoadUI.SerializeType.Load, errNo);
            this.isFileCorrupt[saveID] = true;
            this.DisplayFileInfo(this.currentFile, (SharedDataPreviewSlot)null);
        }
        yield break;
    }
예제 #24
0
 public override Boolean OnKeyCancel(GameObject go)
 {
     if (base.OnKeyCancel(go))
     {
         if (ButtonGroupState.ActiveGroup == SaveLoadUI.SlotGroupButton)
         {
             FF9Sfx.FF9SFX_Play(101);
             this.Hide(delegate
             {
                 PersistenSingleton <UIManager> .Instance.ChangeUIState(PersistenSingleton <UIManager> .Instance.HUDState);
             });
         }
         else if (ButtonGroupState.ActiveGroup == SaveLoadUI.FileGroupButton)
         {
             FF9Sfx.FF9SFX_Play(101);
             base.Loading = true;
             base.FadingComponent.FadePingPong(delegate
             {
                 FF9UIDataTool.DisplayTextLocalize(this.HelpTitleLabel, "SaveHelpSlot");
                 this.SlotListPanel.SetActive(true);
                 this.FileListPanel.SetActive(false);
                 ButtonGroupState.ActiveGroup = SaveLoadUI.SlotGroupButton;
             }, delegate
             {
                 base.Loading = false;
             });
         }
         else if (ButtonGroupState.ActiveGroup == SaveLoadUI.ConfirmDialogGroupButton)
         {
             FF9Sfx.FF9SFX_Play(101);
             this.OverWriteDialog.SetActive(false);
             ButtonGroupState.ActiveGroup = SaveLoadUI.FileGroupButton;
         }
     }
     return(true);
 }
예제 #25
0
 public override Boolean OnKeyConfirm(GameObject go)
 {
     if (base.OnKeyConfirm(go))
     {
         if (ButtonGroupState.ActiveGroup == SaveLoadUI.SlotGroupButton)
         {
             FF9Sfx.FF9SFX_Play(103);
             this.currentSlot = go.transform.GetSiblingIndex();
             ButtonGroupState.DisableAllGroup(true);
             this.LoadingPreviewDialog.SetActive(true);
             FF9UIDataTool.DisplayTextLocalize(this.HelpTitleLabel, "SaveHelpCheck");
             base.Loading     = true;
             this.timeCounter = Time.time;
             FF9StateSystem.Serializer.LoadSlotPreview(this.currentSlot, new ISharedDataSerializer.OnLoadSlotFinish(this.OnFinishedLoadPreview));
         }
         else if (ButtonGroupState.ActiveGroup == SaveLoadUI.FileGroupButton)
         {
             this.currentFile = go.GetComponent <ScrollItemKeyNavigation>().ID;
             if (this.type == SaveLoadUI.SerializeType.Save)
             {
                 FF9Sfx.FF9SFX_Play(103);
                 if (this.isFileExistList[this.currentFile])
                 {
                     this.DisplayOverWriteDialog();
                     ButtonGroupState.ActiveGroup = SaveLoadUI.ConfirmDialogGroupButton;
                 }
                 else
                 {
                     ButtonGroupState.DisableAllGroup(true);
                     FF9UIDataTool.DisplayTextLocalize(this.HelpTitleLabel, "SaveHelpSave");
                     FF9UIDataTool.DisplayTextLocalize(this.loadingAccessText, "WarningSaveData");
                     this.LoadingAccessPanel.SetActive(true);
                     base.StartCoroutine("RunProgressBar");
                     this.timeCounter = Time.time;
                     base.Loading     = true;
                     FF9StateSystem.Settings.UpdateTickTime();
                     FF9StateSystem.Serializer.Save(this.currentSlot, this.currentFile, (ISharedDataSerializer.OnSaveLoadStart)null, new ISharedDataSerializer.OnSaveFinish(this.OnFinishedSaveFile));
                 }
             }
             else if (this.isFileExistList[this.currentFile])
             {
                 FF9Sfx.FF9SFX_Play(103);
                 ButtonGroupState.DisableAllGroup(true);
                 FF9UIDataTool.DisplayTextLocalize(this.HelpTitleLabel, "SaveHelpLoad");
                 FF9UIDataTool.DisplayTextLocalize(this.loadingAccessText, "WarningAccessData");
                 this.LoadingAccessPanel.SetActive(true);
                 base.StartCoroutine("RunProgressBar");
                 this.timeCounter = Time.time;
                 base.Loading     = true;
                 FF9StateSystem.Serializer.Load(this.currentSlot, this.currentFile, (ISharedDataSerializer.OnSaveLoadStart)null, new ISharedDataSerializer.OnLoadFinish(this.OnFinishedLoadFile));
             }
             else
             {
                 FF9Sfx.FF9SFX_Play(102);
             }
         }
         else if (ButtonGroupState.ActiveGroup == SaveLoadUI.ConfirmDialogGroupButton)
         {
             this.OverWriteDialog.SetActive(false);
             if (go.transform.GetSiblingIndex() == 1)
             {
                 FF9Sfx.FF9SFX_Play(103);
                 ButtonGroupState.DisableAllGroup(true);
                 FF9UIDataTool.DisplayTextLocalize(this.HelpTitleLabel, "SaveHelpSave");
                 FF9UIDataTool.DisplayTextLocalize(this.loadingAccessText, "WarningSaveData");
                 this.LoadingAccessPanel.SetActive(true);
                 base.StartCoroutine("RunProgressBar");
                 this.timeCounter = Time.time;
                 base.Loading     = true;
                 FF9StateSystem.Settings.UpdateTickTime();
                 FF9StateSystem.Serializer.Save(this.currentSlot, this.currentFile, (ISharedDataSerializer.OnSaveLoadStart)null, new ISharedDataSerializer.OnSaveFinish(this.OnFinishedSaveFile));
             }
             else
             {
                 FF9Sfx.FF9SFX_Play(101);
                 ButtonGroupState.ActiveGroup = SaveLoadUI.FileGroupButton;
             }
         }
     }
     return(true);
 }
예제 #26
0
    private void DisplayFileInfo(Int32 index, SharedDataPreviewSlot file)
    {
        SaveLoadUI.FileInfoHUD fileInfoHUD = this.fileInfoHudList[index];
        fileInfoHUD.Self.SetActive(true);
        fileInfoHUD.FileNoLabel.text = String.Format(Localization.Get("FileNo"), (index + 1).ToString("0#"));
        if (file != null && !this.isFileCorrupt[index] && !file.IsPreviewCorrupted)
        {
            fileInfoHUD.Container.SetActive(true);
            fileInfoHUD.EmptySlotTextGameObject.SetActive(false);
            Int32   num   = 1;
            String  text  = String.Empty;
            String  text2 = String.Empty;
            Boolean flag  = false;
            Int32   num2  = 0;
            foreach (SharedDataPreviewCharacterInfo sharedDataPreviewCharacterInfo in file.CharacterInfoList)
            {
                fileInfoHUD.CharacterAvatarList[num2].alpha      = 0f;
                fileInfoHUD.CharacterAvatarList[num2].spriteName = String.Empty;
                if (sharedDataPreviewCharacterInfo != null)
                {
                    if (!flag)
                    {
                        num  = sharedDataPreviewCharacterInfo.Level;
                        text = sharedDataPreviewCharacterInfo.Name;
                        flag = true;
                    }
                    fileInfoHUD.CharacterAvatarList[num2].alpha = 1f;
                    FF9UIDataTool.DisplayCharacterAvatar(sharedDataPreviewCharacterInfo.SerialID, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), fileInfoHUD.CharacterAvatarList[num2], false);
                    String text3 = text2;
                    text2 = String.Concat(new String[]
                    {
                        text3,
                        sharedDataPreviewCharacterInfo.Name,
                        "[XTAB=80][YADD=4]",
                        Localization.Get("LvDialogIcon"),
                        "[YSUB=2][FEED=1] ",
                        sharedDataPreviewCharacterInfo.Level.ToString(),
                        "\n"
                    });
                }
                num2++;
            }
            fileInfoHUD.LeaderNameLabel.text   = text;
            fileInfoHUD.LeaderLvLabel.text     = num.ToString();
            fileInfoHUD.GilLabel.text          = file.Gil.ToString() + "[YSUB=1.3][sub]G";
            fileInfoHUD.LocationNameLabel.text = file.Location;
            Color  color = FF9TextTool.White;
            Double num3  = (Double)(file.PlayDuration % 360000f);
            switch ((Int32)(file.PlayDuration / 360000f))
            {
            case 0:
                color = FF9TextTool.White;
                break;

            case 1:
                color = FF9TextTool.Red;
                break;

            case 2:
                color = FF9TextTool.Yellow;
                break;

            case 3:
                color = FF9TextTool.Cyan;
                break;

            case 4:
                color = FF9TextTool.Magenta;
                break;

            case 5:
                color = FF9TextTool.Green;
                break;

            default:
                num3  = 359999.0;
                color = FF9TextTool.Green;
                break;
            }
            String text4 = ((Int32)(num3 / 3600.0)).ToString("0#");
            String text5 = ((Int32)(num3 / 60.0) % 60).ToString("0#");
            String text6 = ((Int32)num3 % 60).ToString("0#");
            fileInfoHUD.TimeLabel.color = color;
            fileInfoHUD.TimeLabel.text  = String.Concat(new String[]
            {
                text4,
                " : ",
                text5,
                " : ",
                text6
            });
            this.DisplayWindowBackground(fileInfoHUD.Self, (file.win_type != 0UL) ? FF9UIDataTool.BlueAtlas : FF9UIDataTool.GrayAtlas);
            fileInfoHUD.Button.Help.TextKey = String.Empty;
            fileInfoHUD.Button.Help.Text    = text2.Remove(text2.Length - 1);
        }
        else if (file == null)
        {
            fileInfoHUD.Container.SetActive(false);
            fileInfoHUD.EmptySlotTextGameObject.SetActive(true);
            if (this.isFileCorrupt[index])
            {
                fileInfoHUD.Button.Help.TextKey      = "CorruptFile";
                fileInfoHUD.EmptySlotTextLabel.text  = Localization.Get("CorruptFile");
                fileInfoHUD.EmptySlotTextLabel.color = FF9TextTool.Red;
            }
            else
            {
                fileInfoHUD.Button.Help.TextKey      = "NoSaveHelp";
                fileInfoHUD.EmptySlotTextLabel.text  = Localization.Get("EmptyFile");
                fileInfoHUD.EmptySlotTextLabel.color = FF9TextTool.White;
            }
            this.DisplayWindowBackground(fileInfoHUD.Self, (UIAtlas)null);
        }
        else if (file.IsPreviewCorrupted)
        {
            fileInfoHUD.Container.SetActive(false);
            fileInfoHUD.EmptySlotTextGameObject.SetActive(true);
            fileInfoHUD.Button.Help.TextKey      = "CorruptFile";
            fileInfoHUD.EmptySlotTextLabel.text  = Localization.Get("CorruptFile");
            fileInfoHUD.EmptySlotTextLabel.color = FF9TextTool.Red;
            this.DisplayWindowBackground(fileInfoHUD.Self, (UIAtlas)null);
        }
    }
예제 #27
0
	public void RemoveAllBitmapIcon()
	{
		FF9UIDataTool.ReleaseAllTypeBitmapIconsToPool();
	}
예제 #28
0
	public void RemoveBitmapIcon(GameObject bitmap)
	{
		FF9UIDataTool.ReleaseBitmapIconToPool(bitmap);
	}
예제 #29
0
    private void DisplayFileInfo(CloudUI.FileCloudInfoHUD fileHud, SharedDataPreviewSlot file, Boolean isCorrupt, DataSerializerErrorCode status)
    {
        fileHud.Self.SetActive(true);
        if (file != null)
        {
            fileHud.Container.SetActive(true);
            fileHud.EmptySlotTextGameObject.SetActive(false);
            Int32   num   = 1;
            String  text  = String.Empty;
            String  empty = String.Empty;
            Boolean flag  = false;
            Int32   num2  = 0;
            foreach (SharedDataPreviewCharacterInfo sharedDataPreviewCharacterInfo in file.CharacterInfoList)
            {
                fileHud.CharacterAvatarList[num2].alpha      = 0f;
                fileHud.CharacterAvatarList[num2].spriteName = String.Empty;
                if (sharedDataPreviewCharacterInfo != null)
                {
                    if (!flag)
                    {
                        num  = sharedDataPreviewCharacterInfo.Level;
                        text = sharedDataPreviewCharacterInfo.Name;
                        flag = true;
                    }
                    fileHud.CharacterAvatarList[num2].alpha = 1f;
                    FF9UIDataTool.DisplayCharacterAvatar(sharedDataPreviewCharacterInfo.SerialID, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), fileHud.CharacterAvatarList[num2], false);
                }
                num2++;
            }
            fileHud.LeaderNameLabel.text   = text;
            fileHud.LeaderLvLabel.text     = num.ToString();
            fileHud.GilLabel.text          = file.Gil.ToString() + "[YSUB=1.3][sub]G";
            fileHud.LocationNameLabel.text = file.Location;
            Color  color = FF9TextTool.White;
            Double num3  = (Double)(file.PlayDuration % 360000f);
            switch ((Int32)(file.PlayDuration / 360000f))
            {
            case 0:
                color = FF9TextTool.White;
                break;

            case 1:
                color = FF9TextTool.Red;
                break;

            case 2:
                color = FF9TextTool.Yellow;
                break;

            case 3:
                color = FF9TextTool.Cyan;
                break;

            case 4:
                color = FF9TextTool.Magenta;
                break;

            case 5:
                color = FF9TextTool.Green;
                break;

            default:
                num3  = 359999.0;
                color = FF9TextTool.Green;
                break;
            }
            String text2 = ((Int32)(num3 / 3600.0)).ToString("0#");
            String text3 = ((Int32)(num3 / 60.0) % 60).ToString("0#");
            String text4 = ((Int32)num3 % 60).ToString("0#");
            fileHud.TimeLabel.color = color;
            fileHud.TimeLabel.text  = String.Concat(new String[]
            {
                text2,
                " : ",
                text3,
                " : ",
                text4
            });
            this.DisplayWindowBackground(fileHud.Self, (file.win_type != 0UL) ? FF9UIDataTool.BlueAtlas : FF9UIDataTool.GrayAtlas);
        }
        else
        {
            fileHud.Container.SetActive(false);
            fileHud.EmptySlotTextGameObject.SetActive(true);
            fileHud.EmptySlotTextLabel.color = FF9TextTool.White;
            if (isCorrupt)
            {
                switch (status)
                {
                case DataSerializerErrorCode.FileCorruption:
                case DataSerializerErrorCode.DataCorruption:
                    fileHud.EmptySlotTextLabel.text  = Localization.Get("LocalDecryptFailed");
                    fileHud.EmptySlotTextLabel.color = FF9TextTool.Red;
                    goto IL_3E7;

                case DataSerializerErrorCode.CloudDataCorruption:
                    fileHud.EmptySlotTextLabel.text  = Localization.Get("CloudDataCorrupt");
                    fileHud.EmptySlotTextLabel.color = FF9TextTool.Red;
                    goto IL_3E7;

                case DataSerializerErrorCode.CloudConnectionTimeout:
                    fileHud.EmptySlotTextLabel.text = Localization.Get("CloudConnectionTimeout");
                    goto IL_3E7;

                case DataSerializerErrorCode.CloudDataUnknownError:
                    fileHud.EmptySlotTextLabel.text = Localization.Get("CloudDataUnknownError");
                    goto IL_3E7;
                }
                fileHud.EmptySlotTextLabel.text = Localization.Get("EmptyFile");
                IL_3E7 :;
            }
            else
            {
                fileHud.EmptySlotTextLabel.text = Localization.Get("EmptyFile");
            }
            this.UpdateEmptySlotLabelSize(fileHud.EmptySlotTextLabel);
        }
    }
예제 #30
0
        private void OnIcon(Int32 oneParameterFromTag)
        {
            String  text4;
            Boolean flag = true;
            Int32   num3 = oneParameterFromTag;

            switch (num3)
            {
            case 34:
                text4 = "[sub]0[/sub]";
                break;

            case 35:
                text4 = "[sub]1[/sub]";
                break;

            case 36:
            case 37:
            case 38:
IL_D2:
                switch (num3)
                {
                case 159:
                    text4 = "[sup]" + Localization.Get("Miss") + "[/sup]";
                    break;

                case 160:
                    text4 = "[sup]" + Localization.Get("Death") + "[/sup]";
                    break;

                case 161:
                    text4 = "[sup]" + Localization.Get("Guard") + "[/sup]";
                    break;

                case 162:
                    text4 = "[B880E0][sup]" + Localization.Get("Critical") + "[/sup][C8C8C8]";
                    break;

                case 163:
                    text4 = "[sup]MP[/sup]";
                    break;

                default:
                    if (num3 == 173)
                    {
                        text4 = "9";
                    }
                    else
                    {
                        if (num3 == 174)
                        {
                            text4 = "/";
                        }
                        else
                        {
                            if (num3 == 45)
                            {
                                text4 = "[sub]/[/sub]";
                            }
                            else
                            {
                                text4 = String.Concat("[ICON", "=", oneParameterFromTag, "] ");
                                flag  = false;
                            }
                        }
                    }
                    break;
                }
                break;

            case 39:
                text4 = "[sub]5[/sub]";
                break;

            default:
                goto IL_D2;
            }
            _sb.Append(text4);
            if (flag)
            {
                _currentWidth += NGUIText.GetTextWidthFromFF9Font(_label, FF9TextTool.RemoveOpCode(text4));
            }
            else
            {
                _currentWidth += FF9UIDataTool.GetIconSize(oneParameterFromTag).x;
            }
        }