mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-18 05:59:03 +03:00
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)
38 lines
914 B
C#
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();
|
|
}
|
|
}
|