2023-06-05 16:33:49 +12:00
|
|
|
|
using Robust.Client.AutoGenerated;
|
2021-09-19 19:34:46 +02:00
|
|
|
|
using Robust.Client.UserInterface;
|
|
|
|
|
|
using Robust.Client.UserInterface.Controls;
|
|
|
|
|
|
using Robust.Client.UserInterface.XAML;
|
|
|
|
|
|
using Robust.Shared;
|
|
|
|
|
|
using Robust.Shared.Configuration;
|
|
|
|
|
|
|
2023-09-29 21:54:46 -07:00
|
|
|
|
namespace Content.Client.MainMenu.UI;
|
2021-09-19 19:34:46 +02:00
|
|
|
|
|
2023-09-29 21:54:46 -07:00
|
|
|
|
[GenerateTypedNameReferences]
|
|
|
|
|
|
public sealed partial class MainMenuControl : Control
|
|
|
|
|
|
{
|
2024-01-31 15:08:17 +00:00
|
|
|
|
public MainMenuControl(IConfigurationManager configMan)
|
2023-09-29 21:54:46 -07:00
|
|
|
|
{
|
|
|
|
|
|
RobustXamlLoader.Load(this);
|
2021-09-19 19:34:46 +02:00
|
|
|
|
|
2023-09-29 21:54:46 -07:00
|
|
|
|
LayoutContainer.SetAnchorPreset(this, LayoutContainer.LayoutPreset.Wide);
|
2021-09-19 19:34:46 +02:00
|
|
|
|
|
2024-01-31 15:08:17 +00:00
|
|
|
|
LayoutContainer.SetAnchorPreset(VBox, LayoutContainer.LayoutPreset.Center);
|
|
|
|
|
|
LayoutContainer.SetGrowHorizontal(VBox, LayoutContainer.GrowDirection.Both);
|
|
|
|
|
|
LayoutContainer.SetGrowVertical(VBox, LayoutContainer.GrowDirection.Both);
|
2021-09-19 19:34:46 +02:00
|
|
|
|
|
2023-09-29 21:54:46 -07:00
|
|
|
|
var currentUserName = configMan.GetCVar(CVars.PlayerName);
|
|
|
|
|
|
UsernameBox.Text = currentUserName;
|
|
|
|
|
|
}
|
2021-09-19 19:34:46 +02:00
|
|
|
|
}
|