6
StarHorizon_Public/Content.Client/Weapons/Melee/UI/MeleeSpeechWindow.xaml.cs
2026-01-13 18:31:02 +02:00

29 lines
571 B
C#

using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;
namespace Content.Client.Weapons.Melee.UI;
[GenerateTypedNameReferences]
public sealed partial class MeleeSpeechWindow : DefaultWindow
{
public event Action<string>? OnBattlecryEntered;
public MeleeSpeechWindow()
{
RobustXamlLoader.Load(this);
BattlecryLineEdit.OnTextEntered += e => OnBattlecryEntered?.Invoke(e.Text);
}
public void SetCurrentBattlecry(string battlecry)
{
BattlecryLineEdit.Text = battlecry;
}
}