first commit

This commit is contained in:
2025-07-06 00:23:46 +02:00
commit 38f50c8819
1788 changed files with 112878 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
using NitroxClient.GameLogic.ChatUI;
using UnityEngine;
using UnityEngine.UI;
namespace NitroxClient.MonoBehaviours.Gui.Chat
{
public class PlayerChatLogItem : MonoBehaviour
{
private Text playerName;
private Text time;
private Text message;
private void SetupComponents()
{
Text[] textFields = gameObject.GetComponentsInChildren<Text>();
playerName = textFields[0];
time = textFields[1];
message = textFields[2];
}
public void ApplyOnPrefab(ChatLogEntry chatLogEntry)
{
if (playerName == null)
{
SetupComponents();
}
playerName.text = chatLogEntry.PlayerName;
playerName.color = chatLogEntry.PlayerColor;
time.text = chatLogEntry.Time;
message.text = chatLogEntry.MessageText;
gameObject.SetActive(true);
}
}
}