Flavor text (#8070)
This commit is contained in:
25
Content.Client/FlavorText/FlavorText.xaml.cs
Normal file
25
Content.Client/FlavorText/FlavorText.xaml.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user