Esempio n. 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);
    }
Esempio n. 2
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);
     }
 }
Esempio n. 3
0
    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);
        }
    }