修改物体标签 可支持换行输入更多内容

This commit is contained in:
shenjianxing 2025-02-08 11:12:50 +08:00
parent 21219479b7
commit abf018ca63
3 changed files with 12 additions and 10 deletions

View File

@ -86,8 +86,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 138.84, y: -17}
m_SizeDelta: {x: 247.68, y: 34}
m_AnchoredPosition: {x: 35.93, y: -16.205}
m_SizeDelta: {x: 41.86, y: 22.41}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4957094274820776498
CanvasRenderer:
@ -117,7 +117,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 12313123123123213123123123123
m_text: 12321
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 97936a7b3a86809479ac89371e95b079, type: 2}
m_sharedMaterial: {fileID: 168401102475399263, guid: 97936a7b3a86809479ac89371e95b079, type: 2}
@ -240,7 +240,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 44.3}
m_SizeDelta: {x: 277.68, y: 34}
m_SizeDelta: {x: 71.86, y: 32.41}
m_Pivot: {x: 0.5000002, y: 0.4999999}
--- !u!222 &1036003715876543771
CanvasRenderer:
@ -295,14 +295,14 @@ MonoBehaviour:
m_Padding:
m_Left: 15
m_Right: 15
m_Top: 0
m_Bottom: 0
m_Top: 5
m_Bottom: 5
m_ChildAlignment: 0
m_Spacing: 0
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 1
m_ChildControlHeight: 0
m_ChildControlHeight: 1
m_ChildScaleWidth: 1
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
@ -319,7 +319,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_HorizontalFit: 2
m_VerticalFit: 0
m_VerticalFit: 2
--- !u!1 &7435450924104219624
GameObject:
m_ObjectHideFlags: 0

View File

@ -49,7 +49,7 @@ TextureImporter:
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 35, y: 0, z: 35, w: 0}
spriteBorder: {x: 35, y: 16, z: 35, w: 16}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1

View File

@ -1,6 +1,8 @@
using UnityEngine;
using UnityEngine.UI;
using QFramework;
using System.Security.Cryptography;
using System.Text.RegularExpressions;
namespace QFramework.Example
{
@ -31,7 +33,7 @@ namespace QFramework.Example
public void Set(string txt)
{
Label.text = txt;
Label.text = Regex.Replace(txt, @"\\n", "\n");
}
public void Active(bool active)
{