LoadingScreenControl.xaml.cs 1.5 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. using Robust.Shared.Utility;
  9. namespace Content.Client.Replay.UI.Loading;
  10. [GenerateTypedNameReferences]
  11. public sealed partial class LoadingScreenControl : Control
  12. {
  13. public static SpriteSpecifier Sprite = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Silicon/Bots/mommi.rsi"), "wiggle");
  14. public LoadingScreenControl(IResourceCache resCache)
  15. {
  16. RobustXamlLoader.Load(this);
  17. LayoutContainer.SetAnchorPreset(this, LayoutContainer.LayoutPreset.Wide);
  18. Header.FontOverride = resCache.GetFont("/Fonts/NotoSansDisplay/NotoSansDisplay-Bold.ttf", 24);
  19. Subtext.FontOverride = resCache.GetFont("/Fonts/NotoSansDisplay/NotoSansDisplay-Bold.ttf", 12);
  20. SpriteLeft.SetFromSpriteSpecifier(Sprite);
  21. SpriteRight.SetFromSpriteSpecifier(Sprite);
  22. SpriteLeft.HorizontalAlignment = HAlignment.Stretch;
  23. SpriteLeft.VerticalAlignment = VAlignment.Stretch;
  24. SpriteLeft.DisplayRect.Stretch = TextureRect.StretchMode.KeepAspectCentered;
  25. SpriteRight.DisplayRect.Stretch = TextureRect.StretchMode.KeepAspectCentered;
  26. Background.PanelOverride = new StyleBoxFlat()
  27. {
  28. BackgroundColor = Color.FromHex("#303033"),
  29. BorderColor = Color.FromHex("#5a5a5a"),
  30. BorderThickness = new Thickness(4)
  31. };
  32. }
  33. }