Improve Main Menu (#43891)

* Format code

* Fix Changelog button having incorrect size

* Reorder Changelog to no longer be the last one

* Switch changelog and quit colors

It doesn't make sense for Quit to be uncolored, yet for Changelog to be
red. I'm not sure if positive green is the right color, but there's not
really a better option to do quickly/easily

* Shape the buttons using Open{Left,Right,Both}

I wish we got the new XAMLX already as doing the <system:String> thing
is uh... not desirable

* Add background to MainMenu and change some margins and separations
This commit is contained in:
Thomas
2026-05-16 13:56:40 -05:00
committed by GitHub
parent 57baa00fdf
commit ee172f4fd2
+56 -38
View File
@@ -1,52 +1,70 @@
<Control xmlns="https://spacestation14.io"
xmlns:pllax="clr-namespace:Content.Client.Parallax"
xmlns:clog="clr-namespace:Content.Client.Changelog">
xmlns:clog="clr-namespace:Content.Client.Changelog"
xmlns:system="clr-namespace:System;assembly=System.Runtime">
<pllax:ParallaxControl
Name="BackgroundParallax"
SpeedX="5"
SpeedY="20"
ScaleX="3"
ScaleY="3"/>
ScaleY="3" />
<BoxContainer Name="VBox"
Orientation="Vertical"
HorizontalAlignment="Center"
VerticalAlignment="Center"
HorizontalExpand="True"
VerticalExpand="True"
StyleIdentifier="mainMenuVBox"
SeparationOverride="3">
<TextureRect Name="Logo"
Stretch="KeepCentered"/>
<GridContainer Columns="2">
<Label Text="{Loc 'main-menu-username-label'}" />
<LineEdit Name="UsernameBox"
Access="Public"
PlaceHolder="{Loc 'main-menu-username-text'}"
HorizontalExpand="True" />
<Label Text="{Loc 'main-menu-address-label'}"/>
<LineEdit Name="AddressBox"
Access="Public"
Text="localhost"
PlaceHolder="server address:port"
HorizontalExpand="True" />
</GridContainer>
<Button Name="DirectConnectButton"
Access="Public"
Text="{Loc 'main-menu-direct-connect-button'}"
TextAlign="Center"
StyleIdentifier="mainMenu"/>
<Button Name="OptionsButton"
Access="Public"
Text="{Loc 'main-menu-options-button'}"
TextAlign="Center"
StyleIdentifier="mainMenu"/>
<Button Name="QuitButton"
Access="Public"
Text="{Loc 'main-menu-quit-button'}"
TextAlign="Center"
StyleIdentifier="mainMenu"/>
<clog:ChangelogButton
Name="ChangelogButton"
Access="Public"/>
VerticalExpand="True">
<PanelContainer StyleClasses="BackgroundPanel">
<BoxContainer Orientation="Vertical"
HorizontalAlignment="Center"
VerticalAlignment="Center"
HorizontalExpand="True"
VerticalExpand="True"
StyleIdentifier="mainMenuVBox"
Margin="4 16">
<TextureRect Name="Logo"
Stretch="KeepCentered" />
<GridContainer Columns="2" Margin="0 4">
<Label Text="{Loc 'main-menu-username-label'}" />
<LineEdit Name="UsernameBox"
Access="Public"
PlaceHolder="{Loc 'main-menu-username-text'}"
HorizontalExpand="True" />
<Label Text="{Loc 'main-menu-address-label'}" />
<LineEdit Name="AddressBox"
Access="Public"
Text="localhost"
PlaceHolder="server address:port"
HorizontalExpand="True" />
</GridContainer>
<Button Name="DirectConnectButton"
Access="Public"
Text="{Loc 'main-menu-direct-connect-button'}"
TextAlign="Center"
StyleClasses="OpenLeft"
StyleIdentifier="mainMenu" />
<clog:ChangelogButton
Name="ChangelogButton"
StyleIdentifier="mainMenu"
StyleClasses="OpenBoth"
Access="Public" />
<Button Name="OptionsButton"
Access="Public"
Text="{Loc 'main-menu-options-button'}"
TextAlign="Center"
StyleClasses="OpenBoth"
StyleIdentifier="mainMenu" />
<Button Name="QuitButton"
Access="Public"
Text="{Loc 'main-menu-quit-button'}"
TextAlign="Center"
StyleIdentifier="mainMenu">
<Control.StyleClasses>
<system:String>negative</system:String>
<system:String>OpenRight</system:String>
</Control.StyleClasses>
</Button>
</BoxContainer>
</PanelContainer>
</BoxContainer>
</Control>