少年修仙传客户端代码仓库
client_Wu Xijin
2019-03-16 08f1607a23dae78b6ce3de05218b7f8d136eb15d
3335 修改装备tip界面。
2个文件已修改
16 ■■■■ 已修改文件
System/ItemTip/EquipTipUtility.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/ItemTip/TipLegendPropertyWidget.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/ItemTip/EquipTipUtility.cs
@@ -56,6 +56,7 @@
        public struct LegendProperty
        {
            public bool isPreview;
            public int trueCount;
            public List<Int2> properties;
        }
@@ -334,6 +335,7 @@
        {
            var data = new LegendProperty();
            data.isPreview = true;
            data.trueCount = LegendPropertyUtility.GetEquipPropertyCount(itemId);
            data.properties = LegendPropertyUtility.GetEquipProperties(itemId);
            return data;
System/ItemTip/TipLegendPropertyWidget.cs
@@ -4,6 +4,7 @@
//--------------------------------------------------------
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
namespace Snxxz.UI
@@ -16,7 +17,7 @@
        public void Display(EquipTipUtility.LegendProperty data)
        {
            var count = data.properties.Count;
            var lines = new string[count];
            var lines = new List<string>();
            for (int i = 0; i < count; i++)
            {
                var property = data.properties[i];
@@ -25,15 +26,20 @@
                var quality = LegendPropertyConfig.Get(property.x).quality;
                if (data.isPreview)
                {
                    lines[i] = UIHelper.AppendColor(quality, string.Format("【推荐】{0}+{1}", config.Name, value));
                    lines.Add(UIHelper.AppendColor(quality, string.Format("【推荐】{0}+{1}", config.Name, value)));
                }
                else
                {
                    lines[i] = UIHelper.AppendColor(quality, string.Format("{0}+{1}", config.Name, value));
                    lines.Add(UIHelper.AppendColor(quality, string.Format("{0}+{1}", config.Name, value)));
                }
            }
            m_PropertyBehaviours.text = string.Join("\r\n", lines);
            if (data.isPreview)
            {
                var description = UIHelper.AppendColor(TextColType.Green, UIHelper.ReplaceNewLine(Language.Get("LegendAttributePriview1", data.trueCount)));
                lines.Insert(0, description);
            }
            m_PropertyBehaviours.text = string.Join("\r\n", lines.ToArray());
        }
    }