Skip to content

Commit

Permalink
Remove v0.1 version number from local main menu screen (space-wizards…
Browse files Browse the repository at this point in the history
  • Loading branch information
DrSmugleaf authored Sep 30, 2023
1 parent ca64217 commit 379de4b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 23 deletions.
1 change: 0 additions & 1 deletion Content.Client/MainMenu/UI/MainMenuControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,5 @@
Name="ChangelogButton"
Access="Public"/>
</BoxContainer>
<Label Name="VersionLabel" Text="v0.1" />
</LayoutContainer>
</Control>
39 changes: 17 additions & 22 deletions Content.Client/MainMenu/UI/MainMenuControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,26 @@
using Robust.Shared;
using Robust.Shared.Configuration;

namespace Content.Client.MainMenu.UI
{
[GenerateTypedNameReferences]
public sealed partial class MainMenuControl : Control
{
public MainMenuControl(IResourceCache resCache, IConfigurationManager configMan)
{
RobustXamlLoader.Load(this);
namespace Content.Client.MainMenu.UI;

LayoutContainer.SetAnchorPreset(this, LayoutContainer.LayoutPreset.Wide);
[GenerateTypedNameReferences]
public sealed partial class MainMenuControl : Control
{
public MainMenuControl(IResourceCache resCache, IConfigurationManager configMan)
{
RobustXamlLoader.Load(this);

LayoutContainer.SetAnchorPreset(VBox, LayoutContainer.LayoutPreset.TopRight);
LayoutContainer.SetMarginRight(VBox, -25);
LayoutContainer.SetMarginTop(VBox, 30);
LayoutContainer.SetGrowHorizontal(VBox, LayoutContainer.GrowDirection.Begin);
LayoutContainer.SetAnchorPreset(this, LayoutContainer.LayoutPreset.Wide);

var logoTexture = resCache.GetResource<TextureResource>("/Textures/Logo/logo.png");
Logo.Texture = logoTexture;
LayoutContainer.SetAnchorPreset(VBox, LayoutContainer.LayoutPreset.TopRight);
LayoutContainer.SetMarginRight(VBox, -25);
LayoutContainer.SetMarginTop(VBox, 30);
LayoutContainer.SetGrowHorizontal(VBox, LayoutContainer.GrowDirection.Begin);

var currentUserName = configMan.GetCVar(CVars.PlayerName);
UsernameBox.Text = currentUserName;
var logoTexture = resCache.GetResource<TextureResource>("/Textures/Logo/logo.png");
Logo.Texture = logoTexture;

LayoutContainer.SetAnchorPreset(VersionLabel, LayoutContainer.LayoutPreset.BottomRight);
LayoutContainer.SetGrowHorizontal(VersionLabel, LayoutContainer.GrowDirection.Begin);
LayoutContainer.SetGrowVertical(VersionLabel, LayoutContainer.GrowDirection.Begin);
}
}
var currentUserName = configMan.GetCVar(CVars.PlayerName);
UsernameBox.Text = currentUserName;
}
}

0 comments on commit 379de4b

Please sign in to comment.