diff --git a/Content.Client/Chemistry/UI/ChemMasterBoundUserInterface.cs b/Content.Client/Chemistry/UI/ChemMasterBoundUserInterface.cs index 793c4694832..f429511d318 100644 --- a/Content.Client/Chemistry/UI/ChemMasterBoundUserInterface.cs +++ b/Content.Client/Chemistry/UI/ChemMasterBoundUserInterface.cs @@ -10,15 +10,11 @@ namespace Content.Client.Chemistry.UI /// Initializes a and updates it when new server messages are received. /// [UsedImplicitly] - public sealed class ChemMasterBoundUserInterface : BoundUserInterface + public sealed class ChemMasterBoundUserInterface(EntityUid owner, Enum uiKey) : BoundUserInterface(owner, uiKey) { [ViewVariables] private ChemMasterWindow? _window; - public ChemMasterBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) - { - } - /// /// Called each time a chem master UI instance is opened. Generates the window and fills it with /// relevant info. Sets the actions for static buttons. @@ -49,7 +45,11 @@ protected override void Open() _window.PillTypeButtons[i].OnPressed += _ => SendMessage(new ChemMasterSetPillTypeMessage(pillType)); } - _window.OnReagentButtonPressed += (args, button) => SendMessage(new ChemMasterReagentAmountButtonMessage(button.Id, button.Amount, button.IsBuffer)); + _window.OnReagentButtonPressed += (_, button, amount) => SendMessage(new ChemMasterReagentAmountButtonMessage(button.Id, amount, button.IsBuffer)); + _window.OnSortMethodChanged += sortMethod => SendMessage(new ChemMasterSortMethodUpdated(sortMethod)); + _window.OnTransferAmountChanged += amount => SendMessage(new ChemMasterTransferringAmountUpdated(amount)); + + } /// @@ -64,7 +64,6 @@ protected override void UpdateState(BoundUserInterfaceState state) base.UpdateState(state); var castState = (ChemMasterBoundUserInterfaceState) state; - _window?.UpdateState(castState); // Update window state } } diff --git a/Content.Client/Chemistry/UI/ChemMasterWindow.xaml b/Content.Client/Chemistry/UI/ChemMasterWindow.xaml index 04ee58f10c2..788b018d4d4 100644 --- a/Content.Client/Chemistry/UI/ChemMasterWindow.xaml +++ b/Content.Client/Chemistry/UI/ChemMasterWindow.xaml @@ -2,7 +2,7 @@ xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client" - MinSize="620 670" + MinSize="500 770" Title="{Loc 'chem-master-bound-user-interface-title'}"> @@ -10,7 +10,9 @@