2021-09-19 19:34:46 +02:00
|
|
|
|
using Content.Client.Changelog;
|
|
|
|
|
|
using Content.Client.Parallax;
|
|
|
|
|
|
using Robust.Client.AutoGenerated;
|
|
|
|
|
|
using Robust.Client.ResourceManagement;
|
|
|
|
|
|
using Robust.Client.UserInterface;
|
|
|
|
|
|
using Robust.Client.UserInterface.Controls;
|
|
|
|
|
|
using Robust.Client.UserInterface.XAML;
|
|
|
|
|
|
using Robust.Shared;
|
|
|
|
|
|
using Robust.Shared.Configuration;
|
|
|
|
|
|
using Robust.Shared.Localization;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Client.MainMenu.UI
|
|
|
|
|
|
{
|
|
|
|
|
|
[GenerateTypedNameReferences]
|
2022-02-16 00:23:23 -07:00
|
|
|
|
public sealed partial class MainMenuControl : Control
|
2021-09-19 19:34:46 +02:00
|
|
|
|
{
|
|
|
|
|
|
public MainMenuControl(IResourceCache resCache, IConfigurationManager configMan)
|
|
|
|
|
|
{
|
|
|
|
|
|
RobustXamlLoader.Load(this);
|
|
|
|
|
|
|
|
|
|
|
|
LayoutContainer.SetAnchorPreset(this, LayoutContainer.LayoutPreset.Wide);
|
|
|
|
|
|
|
|
|
|
|
|
LayoutContainer.SetAnchorPreset(VBox, LayoutContainer.LayoutPreset.TopRight);
|
|
|
|
|
|
LayoutContainer.SetMarginRight(VBox, -25);
|
|
|
|
|
|
LayoutContainer.SetMarginTop(VBox, 30);
|
|
|
|
|
|
LayoutContainer.SetGrowHorizontal(VBox, LayoutContainer.GrowDirection.Begin);
|
|
|
|
|
|
|
|
|
|
|
|
var logoTexture = resCache.GetResource<TextureResource>("/Textures/Logo/logo.png");
|
|
|
|
|
|
Logo.Texture = logoTexture;
|
|
|
|
|
|
|
|
|
|
|
|
var currentUserName = configMan.GetCVar(CVars.PlayerName);
|
2021-10-28 14:23:17 +02:00
|
|
|
|
UsernameBox.Text = currentUserName;
|
2021-09-19 19:34:46 +02:00
|
|
|
|
|
|
|
|
|
|
LayoutContainer.SetAnchorPreset(VersionLabel, LayoutContainer.LayoutPreset.BottomRight);
|
|
|
|
|
|
LayoutContainer.SetGrowHorizontal(VersionLabel, LayoutContainer.GrowDirection.Begin);
|
|
|
|
|
|
LayoutContainer.SetGrowVertical(VersionLabel, LayoutContainer.GrowDirection.Begin);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|