using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; namespace Penguloon { public static class StaticUIValues { public static Vector2 ScreenViewport { get; private set; } public static Vector2 LoadingProgressbarSize { get; set; } public static Vector2 LoadingProgressbarPosition { get; set; } public static Vector2 LoadingProgressbarValuePosition { get; set; } public static int LevelSelectorHeight { get; set; } public static Vector2 MenuButtonSize { get; set; } public static int SnowflakeSize { get; set; } public static string MenuFont { get; set; } public static string IngameFont { get; set; } public static string IngameFontSmall { get; set; } public static int IngameUIWidth { get; set; } public static int BorderWidth { get; set; } = 20; public static int IngameUITextAreaHeight { get; set; } public static int IngameUIPlayButtonHeight { get; set; } public static void Initialize(Main main) { ScreenViewport = main.GraphicsDevice.Viewport.Bounds.Size.ToVector2(); if(ScreenViewport.X >= 2440) { LevelSelectorHeight = 600; LoadingProgressbarSize = new Vector2((int)(800 * 2), (int)(150 * 2)); MenuButtonSize = new Vector2(800, 150); MenuFont = "Fonts/GWENT/72"; } else if (ScreenViewport.X >= 1920) { LevelSelectorHeight = 600; MenuButtonSize = new Vector2((int)(800 * 1), (int)(150 * 1)); LoadingProgressbarSize = new Vector2((int)(800 * 1.3), (int)(150 * 1.3)); MenuFont = "Fonts/GWENT/72"; } else if (ScreenViewport.X >= 1280) { LevelSelectorHeight = 400; MenuButtonSize = new Vector2((int)(800 * 0.7), (int)(150 * 0.7)); LoadingProgressbarSize = new Vector2((int)(800 * 1), (int)(150 * 1)); MenuFont = "Fonts/GWENT/48"; } else { LevelSelectorHeight = 400; MenuButtonSize = new Vector2((int)(800 * 0.7), (int)(150 * 0.7)); LoadingProgressbarSize = new Vector2((int)(800 * 0.7), (int)(150 * 0.7)); MenuFont = "Fonts/GWENT/48"; } IngameFont = "Fonts/GWENT/24"; IngameFontSmall = "Fonts/GWENT/16"; LoadingProgressbarPosition = new Vector2((ScreenViewport.X - LoadingProgressbarSize.X) / 2, ScreenViewport.Y - LoadingProgressbarSize.Y - 200); LoadingProgressbarValuePosition = new Vector2(LoadingProgressbarPosition.X + 5, LoadingProgressbarPosition.Y + 5); IngameUIWidth = 250; SnowflakeSize = 100; IngameUITextAreaHeight = 120; IngameUIPlayButtonHeight = 120; } } }