diff --git a/Content.Client/Lathe/UI/LatheBoundUserInterface.cs b/Content.Client/Lathe/UI/LatheBoundUserInterface.cs index 5c3e8ea036..03159b5859 100644 --- a/Content.Client/Lathe/UI/LatheBoundUserInterface.cs +++ b/Content.Client/Lathe/UI/LatheBoundUserInterface.cs @@ -29,16 +29,15 @@ namespace Content.Client.Lathe.UI _menu.OnQueueButtonPressed += _ => { - _queueMenu.OpenCenteredLeft(); + if (_queueMenu.IsOpen) + _queueMenu.Close(); + else + _queueMenu.OpenCenteredLeft(); }; _menu.OnServerListButtonPressed += _ => { SendMessage(new ConsoleServerSelectionMessage()); }; - _menu.OnServerSyncButtonPressed += _ => - { - SendMessage(new ConsoleServerSyncMessage()); - }; _menu.RecipeQueueAction += (recipe, amount) => { SendMessage(new LatheQueueRecipeMessage(recipe, amount)); @@ -56,7 +55,7 @@ namespace Content.Client.Lathe.UI case LatheUpdateState msg: if (_menu != null) _menu.Recipes = msg.Recipes; - _menu?.PopulateRecipes(Owner.Owner); + _menu?.PopulateRecipes(Lathe); _menu?.PopulateMaterials(Lathe); _queueMenu?.PopulateList(msg.Queue); _queueMenu?.SetInfo(msg.CurrentlyProducing); diff --git a/Content.Client/Lathe/UI/LatheMenu.xaml b/Content.Client/Lathe/UI/LatheMenu.xaml index f5f6ecff8b..50f6fd9948 100644 --- a/Content.Client/Lathe/UI/LatheMenu.xaml +++ b/Content.Client/Lathe/UI/LatheMenu.xaml @@ -1,85 +1,84 @@  + HorizontalExpand="True"> - - + + HorizontalExpand="True"> - - - - - + + + + + + + + + + + + + + + - - diff --git a/Content.Client/Lathe/UI/LatheMenu.xaml.cs b/Content.Client/Lathe/UI/LatheMenu.xaml.cs index 7a1a4f08f3..7247db647b 100644 --- a/Content.Client/Lathe/UI/LatheMenu.xaml.cs +++ b/Content.Client/Lathe/UI/LatheMenu.xaml.cs @@ -1,5 +1,6 @@ using System.Linq; using System.Text; +using Content.Client.Stylesheets; using Content.Shared.Lathe; using Content.Shared.Materials; using Content.Shared.Research.Prototypes; @@ -22,7 +23,6 @@ public sealed partial class LatheMenu : DefaultWindow public event Action? OnQueueButtonPressed; public event Action? OnServerListButtonPressed; - public event Action? OnServerSyncButtonPressed; public event Action? RecipeQueueAction; public List Recipes = new(); @@ -49,15 +49,13 @@ public sealed partial class LatheMenu : DefaultWindow QueueButton.OnPressed += a => OnQueueButtonPressed?.Invoke(a); ServerListButton.OnPressed += a => OnServerListButtonPressed?.Invoke(a); - //refresh the bui state - ServerSyncButton.OnPressed += a => OnServerSyncButtonPressed?.Invoke(a); - if (_entityManager.TryGetComponent(owner.Lathe, out var latheComponent)) { if (!latheComponent.DynamicRecipes.Any()) { ServerListButton.Visible = false; - ServerSyncButton.Visible = false; + QueueButton.RemoveStyleClass(StyleBase.ButtonOpenRight); + //QueueButton.AddStyleClass(StyleBase.ButtonSquare); } } } diff --git a/Content.Client/Lathe/UI/RecipeControl.xaml b/Content.Client/Lathe/UI/RecipeControl.xaml index 5ef5342185..cacbf84ff7 100644 --- a/Content.Client/Lathe/UI/RecipeControl.xaml +++ b/Content.Client/Lathe/UI/RecipeControl.xaml @@ -2,11 +2,13 @@