From 5c84877220c3d21b0e8a2a5b70e803508144bae1 Mon Sep 17 00:00:00 2001 From: Lenheart <947330670@qq.com> Date: Fri, 27 Dec 2024 15:26:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E5=AD=97=E7=9A=84?= =?UTF-8?q?=E6=B8=B2=E6=9F=93=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sqr/Core/BaseClass/TextObject/TextActor.nut | 44 +-------------------- sqr/User/Asset/FontAsset.nut | 6 +-- 2 files changed, 5 insertions(+), 45 deletions(-) diff --git a/sqr/Core/BaseClass/TextObject/TextActor.nut b/sqr/Core/BaseClass/TextObject/TextActor.nut index ca17a71..982d523 100644 --- a/sqr/Core/BaseClass/TextObject/TextActor.nut +++ b/sqr/Core/BaseClass/TextObject/TextActor.nut @@ -9,41 +9,6 @@ class TextActor extends CL_BaseObject { //不需要Update函数 NoUpdate = true; - OutlineChild = null; - Strokeoffsets = [{ - x = 1, - y = 0 - }, // 右 - { - x = 1, - y = 1 - }, // 右上 - { - x = 0, - y = 1 - }, // 上 - { - x = -1, - y = 1 - }, // 左上 - { - x = -1, - y = 0 - }, // 左 - { - x = -1, - y = -1 - }, // 左下 - { - x = 0, - y = -1 - }, // 下 - { - x = 1, - y = -1 - } // 右下 - ]; - /* * @函数作用: 构造文本精灵 * @参数 font 可传入全局font Id 或 传入 font对象 @@ -75,16 +40,11 @@ class TextActor extends CL_BaseObject { //设置文本内容 function SetText(str) { TextActor_SetText(this.C_Object, str); - if (OutlineChild) { - foreach(obj in OutlineChild) { - obj.SetText(str); - } - } } //设置描边 - function SetOutline(width, color = Color.Black, cap = CapStyle.Square, line_join = LineJoinStyle.Round, dash = DashStyle.Solid) { - TextActor_SetOutLine(this.C_Object, width, color, cap, line_join, dash); + function SetOutline(color = Color.Black, flag = true) { + TextActor_SetOutLine(this.C_Object, color, flag); } // //设置描边 diff --git a/sqr/User/Asset/FontAsset.nut b/sqr/User/Asset/FontAsset.nut index bee34c6..9fd46ed 100644 --- a/sqr/User/Asset/FontAsset.nut +++ b/sqr/User/Asset/FontAsset.nut @@ -10,8 +10,8 @@ class _FontAssetManager_ { //初始化字体 function InitFont() { //普通宋体小字 - Font.PreLoad("Fonts/GasinamuNew.ttf"); - Font("gasinamuM", 11.5).Register(0); + Font.PreLoad("Fonts/Gasinamu.ttf"); + Font("gasinamu", 11.5).Register(0); } constructor() { @@ -28,7 +28,7 @@ class _FontAssetManager_ { local TextActor = TextActor(0, style); TextActor.SetText(text); if (stroke) - TextActor.SetOutline(3.0); + TextActor.SetOutline(); return TextActor; } } \ No newline at end of file