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 string LoadingScreenTitle { 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 StatsFont { get; set; } public static int StatsSpacingY { get; set; } public static int StatsMarginXRight { 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 int ChangeSpeedButtonWidth { get; set; } public static Vector2 IngameOptionsSize { get; set; } public static Vector2 IngameInfoPanelSize { get; set; } public static Vector2 AlertSize { get; set; } public static Vector2 UpgradePanelSize { get; set; } public static Vector2 ObjectInfoPanelSize { get; set; } = new Vector2(350, 400); public static Vector2 ObjectInfoPanelLineSize { get; set; } = new Vector2(350, 100); public static void Initialize(Main main) { ScreenViewport = main.GraphicsDevice.Viewport.Bounds.Size.ToVector2(); IngameUIWidth = 250; if (ScreenViewport.X >= 2440) { LevelSelectorHeight = 600; LoadingProgressbarSize = new Vector2((int)(800 * 2), (int)(150 * 2)); MenuButtonSize = new Vector2(800, 150); MenuFont = "Fonts/GWENT/72"; IngameUIWidth = 350; IngameUIPlayButtonHeight = 120; ChangeSpeedButtonWidth = 200; IngameOptionsSize = new Vector2(800, 1000); IngameFont = "Fonts/GWENT/36"; StatsFont = "Fonts/GWENT/72"; StatsSpacingY = 90; IngameUITextAreaHeight = 160; StatsMarginXRight = 150; LoadingScreenTitle = "Fonts/GWENT/192"; IngameInfoPanelSize = new Vector2((int)(800 * 0.8), (int)(400 * 0.8)); AlertSize = new Vector2((int)(800 * 1), (int)(200 * 1)); } 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"; IngameUIWidth = 350; IngameUIPlayButtonHeight = 120; ChangeSpeedButtonWidth = 200; IngameOptionsSize = new Vector2((int)(800 * 0.85), (int)(1000 * 0.85)); IngameFont = "Fonts/GWENT/36"; StatsFont = "Fonts/GWENT/72"; StatsSpacingY = 90; IngameUITextAreaHeight = 160; StatsMarginXRight = 150; LoadingScreenTitle = "Fonts/GWENT/192"; IngameInfoPanelSize = new Vector2((int)(800 * 0.8), (int)(400 * 0.8)); AlertSize = new Vector2((int)(800 * 1), (int)(200 * 1)); } 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"; IngameUIPlayButtonHeight = 80; ChangeSpeedButtonWidth = 130; IngameOptionsSize = new Vector2((int)(800 * 0.6), (int)(1000 * 0.6)); IngameFont = "Fonts/GWENT/24"; StatsFont = "Fonts/GWENT/48"; StatsSpacingY = 60; IngameUITextAreaHeight = 120; StatsMarginXRight = 100; LoadingScreenTitle = "Fonts/GWENT/128"; IngameInfoPanelSize = new Vector2((int)(800 * 0.55), (int)(400 * 0.55)); AlertSize = new Vector2((int)(800 * 0.8), (int)(200 * 0.8)); } 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"; IngameUIPlayButtonHeight = 80; ChangeSpeedButtonWidth = 130; IngameOptionsSize = new Vector2((int)(800 * 0.6), (int)(1000 * 0.6)); IngameFont = "Fonts/GWENT/24"; StatsFont = "Fonts/GWENT/48"; StatsSpacingY = 60; IngameUITextAreaHeight = 120; StatsMarginXRight = 100; LoadingScreenTitle = "Fonts/GWENT/128"; IngameInfoPanelSize = new Vector2((int)(800 * 0.55), (int)(400 * 0.55)); AlertSize = new Vector2((int)(800 * 0.8), (int)(200 * 0.8)); } UpgradePanelSize = new Vector2(IngameUIWidth, 100); LoadingProgressbarPosition = new Vector2((ScreenViewport.X - LoadingProgressbarSize.X) / 2, ScreenViewport.Y - LoadingProgressbarSize.Y - 200); LoadingProgressbarValuePosition = new Vector2(LoadingProgressbarPosition.X + 5, LoadingProgressbarPosition.Y + 5); SnowflakeSize = 100; } } }