少年修仙传客户端代码仓库
10261 【越南】【砍树】【英文】仙盟徽章,头像框,头像(动态),聊天气泡,聊天表情-表情在聊天界面上的显示大小由(richtext的)FaceSize决定,当配置0取图片原大小
9个文件已修改
49 ■■■■ 已修改文件
Core/GameEngine/Model/Config/FaceConfig.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/CelestialPalace/CelestialPalaceModel.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Chat/UIFrame.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Chat/UIFrameMgr.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Message/ImgAnalysis.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/RoleTitleCell.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/TitleStarUpWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/WorshipInfoListWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI/HUD/HeadUpName.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/FaceConfig.cs
@@ -1,6 +1,6 @@
//--------------------------------------------------------
//    [Author]:           Fish
//    [  Date ]:           2024年5月17日
//    [  Date ]:           2024年9月22日
//--------------------------------------------------------
using System.Collections.Generic;
@@ -16,6 +16,8 @@
    public readonly string name;
    public readonly int frameCnt;
    public readonly int speed;
    public readonly int frameType;
    public readonly int EmojiPackID;
    public readonly string folder;
    public FaceConfig()
@@ -34,7 +36,11 @@
            int.TryParse(tables[2],out speed); 
            folder = tables[3];
            int.TryParse(tables[3],out frameType);
            int.TryParse(tables[4],out EmojiPackID);
            folder = tables[5];
        }
        catch (Exception ex)
        {
System/CelestialPalace/CelestialPalaceModel.cs
@@ -708,7 +708,7 @@
        {
            DienstgradConfig config = DienstgradConfig.Get(titleId);
            UIFrame frame = imgTitle.GetComponent<UIFrame>();
            if (UIFrameMgr.Inst.ContainsFace(config.Image))
            if (UIFrameMgr.Inst.ContainsDynamicImage(config.Image))
            {
                if (frame == null) frame = imgTitle.gameObject.AddComponent<UIFrame>();
                imgTitle.raycastTarget = false;
System/Chat/UIFrame.cs
@@ -42,7 +42,7 @@
        if (!gameObject.activeInHierarchy) {
            return;
        }
        sprites = UIFrameMgr.Inst.GetDynamicFace(frameKey);
        sprites = UIFrameMgr.Inst.GetDynamicImage(frameKey);
        if (sprites == null||sprites.Count<1) {
            DebugEx.LogError(string.Format("没有{0}对应的帧动画", frameKey));
            enabled = false;
System/Chat/UIFrameMgr.cs
@@ -31,7 +31,7 @@
        var dic = FaceConfig.GetValues();
        foreach (var cfg in dic)
        {
            if (cfg.folder.ToLower() == "frame" && !chatFaces.Contains(cfg.name))
            if (cfg.frameType == 1 && !chatFaces.Contains(cfg.name))
            {
                chatFaces.Add(cfg.name);
            }
@@ -69,14 +69,14 @@
        return chatFaces;
    }
    public List<UnityEngine.Sprite> GetDynamicFace(string key)
    public List<UnityEngine.Sprite> GetDynamicImage(string key)
    {
        List<UnityEngine.Sprite> list = null;
        allFrameDic.TryGetValue(key, out list);
        return list;
    }
    public bool ContainsFace(string key)
    public bool ContainsDynamicImage(string key)
    {
        return allFrameDic.ContainsKey(key);
    }
System/Message/ImgAnalysis.cs
@@ -137,7 +137,24 @@
                        presentImgInfo.IsFace = true;
                        if (RichTextMgr.Inst.presentRichText != null)
                        {
                            presentImgInfo.height = RichTextMgr.Inst.presentRichText.FaceSize;
                            int height = 0;
                            if (RichTextMgr.Inst.presentRichText.FaceSize != 0)
                            {
                                height = (int)RichTextMgr.Inst.presentRichText.FaceSize;
                            }
                            else
                            {
                                if (UIFrameMgr.Inst.ContainsDynamicImage(presentImgInfo.spriteName))
                                {
                                    var list = UIFrameMgr.Inst.GetDynamicImage(presentImgInfo.spriteName);
                                    height = (int)list[0].rect.height;
                                }
                                else
                                {
                                    height = 40;
                                }
                            }
                            presentImgInfo.height = height;
                            presentImgInfo.width = presentImgInfo.height;
                        }
                    }
@@ -213,7 +230,7 @@
            {
                string result = match.Groups[1].Value.Replace("0", "");
                m_StringBuilder.Append(msg.Substring(index, match.Index - index));
                if (UIFrameMgr.Inst.ContainsFace(result))
                if (UIFrameMgr.Inst.ContainsDynamicImage(result))
                {
                    m_StringBuilder.Append(string.Format("<Img face={0}/>", result));
                }
System/Role/RoleTitleCell.cs
@@ -44,7 +44,7 @@
            //m_TitleIcon.SetNativeSize();
            UIFrame frame = m_TitleIcon.GetComponent<UIFrame>();
            if (UIFrameMgr.Inst.ContainsFace(config.Image))
            if (UIFrameMgr.Inst.ContainsDynamicImage(config.Image))
            {
                if (frame == null) frame = m_TitleIcon.gameObject.AddComponent<UIFrame>();
                m_TitleIcon.raycastTarget = false;
System/Role/TitleStarUpWin.cs
@@ -105,7 +105,7 @@
            titleName.text = config.Name + Language.Get("EquipStar11", titleModel.GetTitleStar(titleModel.selectTitleId));
            UIFrame frame = titleImg.GetComponent<UIFrame>();
            if (UIFrameMgr.Inst.ContainsFace(config.Image))
            if (UIFrameMgr.Inst.ContainsDynamicImage(config.Image))
            {
                titleImg.raycastTarget = false;
                frame.enabled = true;
System/Role/WorshipInfoListWin.cs
@@ -108,7 +108,7 @@
            }
            m_TitleIcon.SetActive(true);
            UIFrame frame = m_TitleIcon.GetComponent<UIFrame>();
            if (UIFrameMgr.Inst.ContainsFace(config.Image))
            if (UIFrameMgr.Inst.ContainsDynamicImage(config.Image))
            {
                m_TitleIcon.raycastTarget = false;
                frame.enabled = true;
UI/HUD/HeadUpName.cs
@@ -156,7 +156,7 @@
                m_PlayerTitle.SetActive(true);
                UIFrame frame = m_PlayerTitle.GetComponent<UIFrame>();
                if (UIFrameMgr.Inst.ContainsFace(config.Image))
                if (UIFrameMgr.Inst.ContainsDynamicImage(config.Image))
                {
                    if (frame == null) frame = m_PlayerTitle.gameObject.AddComponent<UIFrame>();
                    m_PlayerTitle.raycastTarget = false;