1
0

ReplayMainMenuControl.xaml.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using Content.Client.Resources;
  2. using Robust.Client.AutoGenerated;
  3. using Robust.Client.Graphics;
  4. using Robust.Client.ResourceManagement;
  5. using Robust.Client.UserInterface;
  6. using Robust.Client.UserInterface.Controls;
  7. using Robust.Client.UserInterface.XAML;
  8. namespace Content.Replay.Menu;
  9. [GenerateTypedNameReferences]
  10. public sealed partial class ReplayMainMenuControl : Control
  11. {
  12. public ReplayMainMenuControl(IResourceCache resCache)
  13. {
  14. RobustXamlLoader.Load(this);
  15. LayoutContainer.SetAnchorPreset(this, LayoutContainer.LayoutPreset.Wide);
  16. LayoutContainer.SetAnchorPreset(VBox, LayoutContainer.LayoutPreset.TopRight);
  17. LayoutContainer.SetMarginRight(VBox, -25);
  18. LayoutContainer.SetMarginTop(VBox, 30);
  19. LayoutContainer.SetGrowHorizontal(VBox, LayoutContainer.GrowDirection.Begin);
  20. Subtext.FontOverride = resCache.GetFont("/Fonts/NotoSansDisplay/NotoSansDisplay-Bold.ttf", 24);
  21. var logoTexture = resCache.GetResource<TextureResource>("/Textures/Logo/logo.png");
  22. Logo.Texture = logoTexture;
  23. LayoutContainer.SetAnchorPreset(InfoContainer, LayoutContainer.LayoutPreset.BottomLeft);
  24. LayoutContainer.SetGrowHorizontal(InfoContainer, LayoutContainer.GrowDirection.End);
  25. LayoutContainer.SetGrowVertical(InfoContainer, LayoutContainer.GrowDirection.Begin);
  26. InfoContainer.PanelOverride = new StyleBoxFlat()
  27. {
  28. BackgroundColor = Color.FromHex("#303033"),
  29. BorderColor = Color.FromHex("#5a5a5a"),
  30. BorderThickness = new Thickness(4)
  31. };
  32. }
  33. }