diff --git a/Content.Client/VoiceMask/VoiceMaskBoundUserInterface.cs b/Content.Client/VoiceMask/VoiceMaskBoundUserInterface.cs index 0650482b108a..f700c6663b9a 100644 --- a/Content.Client/VoiceMask/VoiceMaskBoundUserInterface.cs +++ b/Content.Client/VoiceMask/VoiceMaskBoundUserInterface.cs @@ -1,10 +1,13 @@ using Content.Shared.VoiceMask; using Robust.Client.GameObjects; +using Robust.Shared.Prototypes; namespace Content.Client.VoiceMask; public sealed class VoiceMaskBoundUserInterface : BoundUserInterface { + [Dependency] private readonly IPrototypeManager _proto = default!; + [ViewVariables] private VoiceMaskNameChangeWindow? _window; @@ -16,10 +19,11 @@ protected override void Open() { base.Open(); - _window = new(); + _window = new(_proto); _window.OpenCentered(); _window.OnNameChange += OnNameSelected; + _window.OnVerbChange += verb => SendMessage(new VoiceMaskChangeVerbMessage(verb)); _window.OnClose += Close; } @@ -35,7 +39,7 @@ protected override void UpdateState(BoundUserInterfaceState state) return; } - _window.UpdateState(cast.Name); + _window.UpdateState(cast.Name, cast.Verb); } protected override void Dispose(bool disposing) diff --git a/Content.Client/VoiceMask/VoiceMaskNameChangeWindow.xaml b/Content.Client/VoiceMask/VoiceMaskNameChangeWindow.xaml index 2316ec9c7d85..e23aca123919 100644 --- a/Content.Client/VoiceMask/VoiceMaskNameChangeWindow.xaml +++ b/Content.Client/VoiceMask/VoiceMaskNameChangeWindow.xaml @@ -1,11 +1,16 @@ - - + MinSize="5 30"> +