]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Vending UI facelift (#25377)
authorJames Simonson <jamessimo89@gmail.com>
Mon, 19 Feb 2024 22:18:26 +0000 (06:18 +0800)
committerGitHub <noreply@github.com>
Mon, 19 Feb 2024 22:18:26 +0000 (15:18 -0700)
* Convert to fancy window + added footer + add list spacing

* margin add

Content.Client/VendingMachines/UI/VendingMachineMenu.xaml
Content.Client/VendingMachines/UI/VendingMachineMenu.xaml.cs
Resources/Locale/en-US/vending-machines/vending-machine.ftl

index a990c4eff6437e16f87f1afc4f064391a1eab87c..1fcb1a7898cda7d8fe9b58b2abacb4f417388ef8 100644 (file)
@@ -1,10 +1,28 @@
-<DefaultWindow xmlns="https://spacestation14.io">
+<controls:FancyWindow
+    xmlns="https://spacestation14.io"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
+    xmlns:style="clr-namespace:Content.Client.Stylesheets">
     <BoxContainer Orientation="Vertical">
-        <LineEdit Name="SearchBar" PlaceHolder="{Loc 'vending-machine-component-search-filter'}" HorizontalExpand="True"  Margin ="0 4" Access="Public"/>
+        <LineEdit Name="SearchBar" PlaceHolder="{Loc 'vending-machine-component-search-filter'}" HorizontalExpand="True"  Margin ="4 4" Access="Public"/>
         <ItemList Name="VendingContents"
                   SizeFlagsStretchRatio="8"
                   VerticalExpand="True"
-                  SelectMode="Button">
+                  ItemSeparation="2"
+                  Margin="4 0"
+                  SelectMode="Button"
+                  StyleClasses="transparentBackgroundItemList">
         </ItemList>
+         <!-- Footer -->
+        <BoxContainer Orientation="Vertical">
+            <PanelContainer StyleClasses="LowDivider" />
+            <BoxContainer Orientation="Horizontal" Margin="10 2 5 0" VerticalAlignment="Bottom">
+                <Label Text="{Loc 'vending-machine-flavor-left'}" StyleClasses="WindowFooterText" />
+                <Label Text="{Loc 'vending-machine-flavor-right'}" StyleClasses="WindowFooterText"
+                        HorizontalAlignment="Right" HorizontalExpand="True"  Margin="0 0 5 0" />
+                <TextureRect StyleClasses="NTLogoDark" Stretch="KeepAspectCentered"
+                        VerticalAlignment="Center" HorizontalAlignment="Right" SetSize="19 19"/>
+            </BoxContainer>
+        </BoxContainer>
     </BoxContainer>
-</DefaultWindow>
+</controls:FancyWindow>
index a2741cc17abfa8360a1fb000988bc90454b8e4d5..8b53290f7fb845df88e5e533df306bfca2c4db1f 100644 (file)
@@ -4,14 +4,15 @@ using Robust.Client.AutoGenerated;
 using Robust.Client.GameObjects;
 using Robust.Client.Graphics;
 using Robust.Client.UserInterface.Controls;
-using Robust.Client.UserInterface.CustomControls;
+using Content.Client.Stylesheets;
 using Robust.Client.UserInterface.XAML;
 using Robust.Shared.Prototypes;
+using FancyWindow = Content.Client.UserInterface.Controls.FancyWindow;
 
 namespace Content.Client.VendingMachines.UI
 {
     [GenerateTypedNameReferences]
-    public sealed partial class VendingMachineMenu : DefaultWindow
+    public sealed partial class VendingMachineMenu : FancyWindow
     {
         [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
 
index d527f42cfb68de74215a0ceff27e4290c7151c71..637a9c7568e514253f37149683de62d57d8d5076 100644 (file)
@@ -1 +1,3 @@
 vending-machine-thanks = Thanks for using { $name }!
+vending-machine-flavor-left = Request refills at cargo
+vending-machine-flavor-right = v1.1