| | |
| | | |
| | | private RichTextMgr.ImgInfo presentImgInfo = null; |
| | | |
| | | public override string Analysis(string val, bool IsRich) |
| | | public override async UniTask<string> Analysis(string val, bool IsRich) |
| | | { |
| | | if (!Img_Regex.IsMatch(val)) |
| | | { |
| | |
| | | |
| | | presentImgInfo = imgInfo; |
| | | m_StringBuilder.Append(val.Substring(index, match.Index - index)); |
| | | AnalysisSplitEvent(match.Groups[1].Value); |
| | | await AnalysisSplitEvent(match.Groups[1].Value); |
| | | |
| | | if (IsRich) |
| | | { |
| | |
| | | return val; |
| | | } |
| | | |
| | | private void AnalysisSplitEvent(string val) |
| | | private async UniTask AnalysisSplitEvent(string val) |
| | | { |
| | | string[] array = GetSplitEvent(val); |
| | | if (array.Length > 0) |
| | |
| | | AnalysisSplitData(split_event); |
| | | } |
| | | } |
| | | LoadSprite(); |
| | | await LoadSprite(); |
| | | } |
| | | |
| | | private void AnalysisSplitData(string val) |
| | |
| | | m_StringBuilder.Append("/></color>"); |
| | | } |
| | | |
| | | private void LoadSprite() |
| | | private async UniTask LoadSprite() |
| | | { |
| | | if (presentImgInfo.IsFace) return; |
| | | if (IconConfig.isInit) |
| | | { |
| | | if (!string.IsNullOrEmpty(presentImgInfo.folderName)) |
| | | { |
| | | presentImgInfo.sprite = UILoader.LoadSprite(presentImgInfo.folderName, presentImgInfo.spriteName); |
| | | presentImgInfo.sprite = await UILoader.LoadSpriteAsync(presentImgInfo.folderName, presentImgInfo.spriteName); |
| | | } |
| | | else |
| | | { |
| | | presentImgInfo.sprite = UILoader.LoadSprite(presentImgInfo.spriteName); |
| | | presentImgInfo.sprite = await UILoader.LoadSpriteAsync(presentImgInfo.spriteName); |
| | | } |
| | | } |
| | | |