feat(fix-system): 区分维修终端错误提示颜色

This commit is contained in:
2026-07-19 20:30:05 +08:00
parent d7030f36d2
commit bb6b3dd599
2 changed files with 17 additions and 8 deletions
@@ -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:
@@ -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;
}
}
}
}