Files
UltimateFishing/Assets/Scripts/Assembly-CSharp/ChannelSelector.cs
2026-02-21 16:45:37 +08:00

22 lines
508 B
C#

using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
public class ChannelSelector : MonoBehaviour, IPointerClickHandler, IEventSystemHandler
{
public string Channel;
public void SetChannel(string channel)
{
Channel = channel;
Text componentInChildren = GetComponentInChildren<Text>();
componentInChildren.text = Channel;
}
public void OnPointerClick(PointerEventData eventData)
{
ChatGui chatGui = Object.FindObjectOfType<ChatGui>();
chatGui.ShowChannel(Channel);
}
}