From bb6b3dd599942cedd5a9615bb61aac4e2564713d Mon Sep 17 00:00:00 2001 From: bottlefish <781230111@qq.com> Date: Sun, 19 Jul 2026 20:30:05 +0800 Subject: [PATCH] =?UTF-8?q?feat(fix-system):=20=E5=8C=BA=E5=88=86=E7=BB=B4?= =?UTF-8?q?=E4=BF=AE=E7=BB=88=E7=AB=AF=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Prefabs/FixSystemPrefabs/维修面板.prefab | 14 +++++++------- .../Screen System/FixPanel/ScreenPanel.cs | 11 ++++++++++- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Assets/Prefabs/FixSystemPrefabs/维修面板.prefab b/Assets/Prefabs/FixSystemPrefabs/维修面板.prefab index 26f0b0989..b69b13993 100644 --- a/Assets/Prefabs/FixSystemPrefabs/维修面板.prefab +++ b/Assets/Prefabs/FixSystemPrefabs/维修面板.prefab @@ -1721,8 +1721,8 @@ MonoBehaviour: m_fontMaterials: [] m_fontColor32: serializedVersion: 2 - rgba: 4294967295 - m_fontColor: {r: 0.09019608, g: 0.9960785, b: 0.14901961, a: 0.78431374} + rgba: 4282163942 + m_fontColor: {r: 0.9019608, g: 0.6352941, b: 0.2352941, a: 1} m_enableVertexGradient: 0 m_colorMode: 3 m_fontColorGradient: @@ -9302,8 +9302,8 @@ MonoBehaviour: m_fontMaterials: [] m_fontColor32: serializedVersion: 2 - rgba: 3777429015 - m_fontColor: {r: 0.09019608, g: 0.9960785, b: 0.14901961, a: 0.88235295} + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} m_enableVertexGradient: 0 m_colorMode: 3 m_fontColorGradient: @@ -9316,7 +9316,7 @@ MonoBehaviour: m_tintAllSprites: 0 m_StyleSheet: {fileID: 0} m_TextStyleHashCode: -1183493901 - m_overrideHtmlColors: 0 + m_overrideHtmlColors: 1 m_faceColor: serializedVersion: 2 rgba: 4294967295 @@ -9518,8 +9518,8 @@ MonoBehaviour: m_fontMaterials: [] m_fontColor32: serializedVersion: 2 - rgba: 4278255300 - m_fontColor: {r: 0.7686275, g: 0.9960785, b: 0, a: 1} + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} m_enableVertexGradient: 0 m_colorMode: 3 m_fontColorGradient: diff --git a/Assets/Scripts/FixSystemNew/Screen System/FixPanel/ScreenPanel.cs b/Assets/Scripts/FixSystemNew/Screen System/FixPanel/ScreenPanel.cs index d58db7a95..6e3d040f8 100644 --- a/Assets/Scripts/FixSystemNew/Screen System/FixPanel/ScreenPanel.cs +++ b/Assets/Scripts/FixSystemNew/Screen System/FixPanel/ScreenPanel.cs @@ -1,6 +1,7 @@ using UnityEngine; using AibisDream.UI; using AibisDream.Framework; +using System; using System.Globalization; using TMPro; @@ -8,6 +9,9 @@ namespace AibisDream.FixSystem { public class ScreenPanel : MonoBehaviour, ILineView { + private const string WarningCharacterKey = "Error"; + private static readonly Color WarningRedColor = new(0.9607843f, 0.4235294f, 0.4235294f, 1f); + [SerializeField] private TMP_Text title; [SerializeField] private TerminalText logText; @@ -37,6 +41,11 @@ namespace AibisDream.FixSystem logText.OnTextShown += () => token.TextShown(); + bool isWarning = string.Equals(token.lineInfo.character.key, WarningCharacterKey, + StringComparison.OrdinalIgnoreCase); + + title.overrideColorTags = true; + title.color = isWarning ? WarningRedColor : Color.white; title.text = token.lineInfo.character.GetActorName(); logText.SetTypewriterSpeed(GetTextSpeedValue()); logText.AddText(token.lineInfo.lineText); @@ -60,4 +69,4 @@ namespace AibisDream.FixSystem title.text = string.Empty; } } -} \ No newline at end of file +}