diff --git a/Content.Client/Lathe/UI/LatheMaterialEjector.xaml.cs b/Content.Client/Lathe/UI/LatheMaterialEjector.xaml.cs index 090a189c71..faa397a594 100644 --- a/Content.Client/Lathe/UI/LatheMaterialEjector.xaml.cs +++ b/Content.Client/Lathe/UI/LatheMaterialEjector.xaml.cs @@ -1,3 +1,4 @@ +using Content.Client.Stylesheets; using Content.Shared.Materials; using Robust.Client.AutoGenerated; using Robust.Client.UserInterface; @@ -10,7 +11,6 @@ namespace Content.Client.Lathe.UI; /// /// This widget is one row in the lathe eject menu. /// - [GenerateTypedNameReferences] public sealed partial class LatheMaterialEjector : PanelContainer { @@ -34,19 +34,28 @@ public sealed partial class LatheMaterialEjector : PanelContainer public void PopulateButtons(int maxEjectableSheets) { - int[] sheetsToEjectArray = { 1, 5, 10, 30 }; + int[] sheetsToEjectArray = { 1, 5, 10 }; - foreach (int sheetsToEject in sheetsToEjectArray) + for (var i = 0; i < sheetsToEjectArray.Length; i++) { - var button = new Button() + var sheetsToEject = sheetsToEjectArray[i]; + + var styleClass = StyleBase.ButtonOpenBoth; + if (i == 0) + styleClass = StyleBase.ButtonOpenRight; + else if (i == sheetsToEjectArray.Length - 1) + styleClass = StyleBase.ButtonOpenLeft; + + var button = new Button { Name = $"{sheetsToEject}", Access = AccessLevel.Public, Text = Loc.GetString($"{sheetsToEject}"), MinWidth = 45, + StyleClasses = { styleClass } }; - button.OnPressed += (_) => + button.OnPressed += _ => { OnEjectPressed?.Invoke(Material, sheetsToEject); }; @@ -55,7 +64,7 @@ public sealed partial class LatheMaterialEjector : PanelContainer if (_prototypeManager.TryIndex(Material, out var proto)) { - button.ToolTip = Loc.GetString("lathe-menu-tooltip-display", ("amount", sheetsToEject * VolumePerSheet), ("material", Loc.GetString(proto.Name))); + button.ToolTip = Loc.GetString("lathe-menu-tooltip-display", ("amount", sheetsToEject), ("material", Loc.GetString(proto.Name))); } Content.AddChild(button); diff --git a/Content.Client/Lathe/UI/LatheMenu.xaml b/Content.Client/Lathe/UI/LatheMenu.xaml index 89ca672097..539c08d652 100644 --- a/Content.Client/Lathe/UI/LatheMenu.xaml +++ b/Content.Client/Lathe/UI/LatheMenu.xaml @@ -18,18 +18,6 @@ VerticalExpand="True" HorizontalExpand="True" SeparationOverride="5"> - - - - + - + SeparationOverride="5"> + + + +