protected override void ChoiceChanged()
        {
            Data.IntrinsicData entry = Data.DataManager.Instance.GetIntrinsic(intrinsicChoices[CurrentChoiceTotal]);
            Description.SetText(entry.Desc.ToLocal());

            base.ChoiceChanged();
        }
Пример #2
0
        protected override void ChoiceChanged()
        {
            int index = CurrentChoiceTotal;

            if (index < mapIndices.Count)
            {
                int entryIndex           = mapIndices[index];
                Data.MapStatusData entry = Data.DataManager.Instance.GetMapStatus(entryIndex);
                Description.SetText(entry.Desc.ToLocal());
            }
            else
            {
                int             entryIndex = indices[index - mapIndices.Count];
                Data.StatusData entry      = Data.DataManager.Instance.GetStatus(entryIndex);
                Description.SetText(entry.Desc.ToLocal());
            }
            base.ChoiceChanged();
        }
Пример #3
0
        public void SetSkill(int index)
        {
            SkillData   skillEntry   = DataManager.Instance.GetSkill(index);
            ElementData elementEntry = DataManager.Instance.GetElement(skillEntry.Data.Element);

            SkillElement.SetText(Text.FormatKey("MENU_SKILLS_ELEMENT", elementEntry.GetIconName()));
            SkillCategory.SetText(Text.FormatKey("MENU_SKILLS_CATEGORY", skillEntry.Data.Category.ToLocal()));
            BasePowerState powerState = skillEntry.Data.SkillStates.GetWithDefault <BasePowerState>();

            SkillPower.SetText(Text.FormatKey("MENU_SKILLS_POWER", (powerState != null ? powerState.Power.ToString() : "---")));
            SkillHitRate.SetText(Text.FormatKey("MENU_SKILLS_HIT_RATE", (skillEntry.Data.HitRate > -1 ? skillEntry.Data.HitRate + "%" : "---")));
            Targets.SetText(Text.FormatKey("MENU_SKILLS_RANGE", skillEntry.HitboxAction.GetDescription()));
            Description.SetText(skillEntry.Desc.ToLocal());
        }
Пример #4
0
 public void SetItem(InvItem item)
 {
     Data.ItemData entry = Data.DataManager.Instance.GetItem(item.ID);
     Description.SetText(entry.Desc.ToLocal());
     SalePrice.SetText(Text.FormatKey("MENU_ITEM_VALUE", Text.FormatKey("MONEY_AMOUNT", item.GetSellValue())));
     if (entry.Rarity > 0)
     {
         string rarityStr = "";
         for (int ii = 0; ii < entry.Rarity; ii++)
         {
             rarityStr += "\uE10C";
         }
         Rarity.SetText(Text.FormatKey("MENU_ITEM_RARITY", rarityStr));
     }
     else
     {
         Rarity.SetText("");
     }
 }
Пример #5
0
        public void SetSong(string fileName)
        {
            string name       = "---";
            string originName = "---";
            string origin     = "---";
            string artist     = "---";

            if (File.Exists(fileName))
            {
                try
                {
                    LoopedSong song = new LoopedSong(fileName);
                    name = song.Name;
                    if (song.Tags.ContainsKey("TITLE"))
                    {
                        originName = song.Tags["TITLE"];
                    }
                    if (song.Tags.ContainsKey("ALBUM"))
                    {
                        origin = song.Tags["ALBUM"];
                    }
                    if (song.Tags.ContainsKey("ARTIST"))
                    {
                        artist = song.Tags["ARTIST"];
                    }
                }
                catch (Exception ex)
                {
                    DiagManager.Instance.LogError(new Exception("Error loading song " + fileName + "\n", ex));
                }
            }

            Name.SetText(name);
            OriginName.SetText(Text.FormatKey("MENU_SONG_ORIGIN_NAME", originName));
            Origin.SetText(Text.FormatKey("MENU_SONG_ORIGIN", origin));
            Artist.SetText(Text.FormatKey("MENU_SONG_ARTIST", artist));
        }
Пример #6
0
 public void SetTile(int index)
 {
     Data.TileData entry = Data.DataManager.Instance.GetTile(index);
     Description.SetText(entry.Desc.ToLocal());
 }