Files

26 lines
769 B
C#
Raw Permalink Normal View History

2023-02-19 06:27:56 +13:00
using Content.Client.Stylesheets;
using Content.Shared.Chat;
using Robust.Client.UserInterface.Controls;
namespace Content.Client.UserInterface.Systems.Chat.Controls;
public sealed class ChannelSelectorItemButton : Button
{
public readonly ChatSelectChannel Channel;
public bool IsHidden => Parent == null;
public ChannelSelectorItemButton(ChatSelectChannel selector)
{
Channel = selector;
AddStyleClass(StyleNano.StyleClassChatChannelSelectorButton);
2023-02-19 06:27:56 +13:00
Text = ChannelSelectorButton.ChannelSelectorName(selector);
2022-11-15 17:14:40 +13:00
var prefix = ChatUIController.ChannelPrefixes[selector];
2023-02-19 06:27:56 +13:00
if (prefix != default)
Text = Loc.GetString("hud-chatbox-select-name-prefixed", ("name", Text), ("prefix", prefix));
}
}