Files
tbd-station-14/Content.Client/FlavorText/FlavorText.xaml.cs
2022-05-13 15:58:45 -07:00

26 lines
642 B
C#

using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.XAML;
namespace Content.Client.FlavorText
{
[GenerateTypedNameReferences]
public sealed partial class FlavorText : Control
{
public Action<string>? OnFlavorTextChanged;
public FlavorText()
{
RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);
CFlavorTextInput.OnTextChanged += _ => FlavorTextChanged();
}
public void FlavorTextChanged()
{
OnFlavorTextChanged?.Invoke(CFlavorTextInput.Text);
}
}
}