From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Thu, 28 Mar 2024 06:36:43 +0000 (+0000) Subject: voicemask can select speech verb (#25768) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=d13da2837d3a919df2101b37eae945e633c76c56;p=space-station-14.git voicemask can select speech verb (#25768) * add Name field to SpeechVerbPrototype * extra locale for voice mask ui * SpeechVerb ui and handling * raaaaaaaaa * reeeeeeeeal Co-authored-by: Tayrtahn * fix sort * did you hear john syndicate died of ligma * Update Content.Client/VoiceMask/VoiceMaskNameChangeWindow.xaml --------- Co-authored-by: deltanedas <@deltanedas:kde.org> Co-authored-by: Tayrtahn Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> --- diff --git a/Content.Client/VoiceMask/VoiceMaskBoundUserInterface.cs b/Content.Client/VoiceMask/VoiceMaskBoundUserInterface.cs index 0650482b10..f700c6663b 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 @@ public sealed class VoiceMaskBoundUserInterface : BoundUserInterface { 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 @@ public sealed class VoiceMaskBoundUserInterface : BoundUserInterface 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 2316ec9c7d..e23aca1239 100644 --- a/Content.Client/VoiceMask/VoiceMaskNameChangeWindow.xaml +++ b/Content.Client/VoiceMask/VoiceMaskNameChangeWindow.xaml @@ -1,11 +1,16 @@ - - + MinSize="5 30"> +