From fd6fa4e5cebbe3edb65d50c78dcc8a97ce98ce64 Mon Sep 17 00:00:00 2001 From: aldrikboy Date: Mon, 11 Dec 2017 22:02:13 +0100 Subject: First commit --- Penguloon/StaticUIValues.cs | 64 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 Penguloon/StaticUIValues.cs (limited to 'Penguloon/StaticUIValues.cs') diff --git a/Penguloon/StaticUIValues.cs b/Penguloon/StaticUIValues.cs new file mode 100644 index 0000000..48ae696 --- /dev/null +++ b/Penguloon/StaticUIValues.cs @@ -0,0 +1,64 @@ +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 int IngameUIWidth { 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"; + } + + 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; + } + } +} \ No newline at end of file -- cgit v1.2.3-70-g09d2