diff --git a/Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterBoundUserInterface.cs b/Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterBoundUserInterface.cs new file mode 100644 index 00000000000..c52ee94d6e3 --- /dev/null +++ b/Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterBoundUserInterface.cs @@ -0,0 +1,53 @@ +using Content.Shared._CorvaxNext.BluespaceHarvester; +using JetBrains.Annotations; + +namespace Content.Client._CorvaxNext.BluespaceHarvester; + +[UsedImplicitly] +public sealed class BluespaceHarvesterBoundUserInterface : BoundUserInterface +{ + private BluespaceHarvesterMenu? _window; + + public BluespaceHarvesterBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) + { + } + + protected override void Open() + { + base.Open(); + + _window = new BluespaceHarvesterMenu(this); + _window.OnClose += Close; + _window?.OpenCentered(); + } + + protected override void Dispose(bool disposing) + { + base.Dispose(disposing); + if (!disposing) + return; + + _window?.Dispose(); + _window = null; + } + + protected override void UpdateState(BoundUserInterfaceState state) + { + base.UpdateState(state); + + if (state is not BluespaceHarvesterBoundUserInterfaceState current) + return; + + _window?.UpdateState(current); + } + + public void SendTargetLevel(int level) + { + SendMessage(new BluespaceHarvesterTargetLevelMessage(level)); + } + + public void SendBuy(Shared._CorvaxNext.BluespaceHarvester.BluespaceHarvesterCategory category) + { + SendMessage(new BluespaceHarvesterBuyMessage(category)); + } +} diff --git a/Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterCategory.xaml b/Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterCategory.xaml new file mode 100644 index 00000000000..eef4ac89883 --- /dev/null +++ b/Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterCategory.xaml @@ -0,0 +1,6 @@ + + + +