文字弹窗支持换行
This commit is contained in:
parent
a08d48cb96
commit
4a060ea867
@ -3,6 +3,7 @@ using UnityEngine.UI;
|
||||
using QFramework;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace QFramework.Example
|
||||
{
|
||||
@ -25,7 +26,7 @@ namespace QFramework.Example
|
||||
protected override void OnOpen(IUIData uiData = null)
|
||||
{
|
||||
mData = uiData as UITextTipData ?? new UITextTipData();
|
||||
Des.text = mData.text;
|
||||
Des.text = Regex.Replace(mData.text, @"\\n", "\n");
|
||||
BtnContent.RemoveAllChildren();
|
||||
foreach (var item in mData.btns)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user