Files
wwdpublic/Content.Client/DeltaV/AACTablet/UI/AACBoundUserInterface.cs
sleepyyapril f028176cf2 AAC Tablet Port (#1674)
ports all changes to the AAC tablet and the AAC tablet itself. also puts
it in items loadout.

🆑
- add: Ported the AAC tablet from Delta-V.

---------

Co-authored-by: portfiend <109661617+portfiend@users.noreply.github.com>
Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com>
Co-authored-by: Milon <plmilonpl@gmail.com>
Co-authored-by: deltanedas <@deltanedas:kde.org>
Co-authored-by: Milon <milonpl.git@proton.me>
Co-authored-by: keekee38 <iamabanana372456@gmail.com>
(cherry picked from commit 5f39fa26f8c0370baae6ee5b33bfaeda451ed4a3)
2025-02-14 23:34:34 +03:00

38 lines
914 B
C#

using Content.Shared.DeltaV.AACTablet;
using Content.Shared.DeltaV.QuickPhrase;
using Robust.Shared.Prototypes;
namespace Content.Client.DeltaV.AACTablet.UI;
public sealed class AACBoundUserInterface : BoundUserInterface
{
[ViewVariables]
private AACWindow? _window;
public AACBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
{
}
protected override void Open()
{
base.Open();
_window?.Close();
_window = new AACWindow();
_window.OpenCentered();
_window.PhraseButtonPressed += OnPhraseButtonPressed;
_window.OnClose += Close;
}
private void OnPhraseButtonPressed(ProtoId<QuickPhrasePrototype> phraseId)
{
SendMessage(new AACTabletSendPhraseMessage(phraseId));
}
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
_window?.Orphan();
}
}