1 #region Copyright & License Information 2 /* 3 * Copyright 2007-2020 The OpenRA Developers (see AUTHORS) 4 * This file is part of OpenRA, which is free software. It is made 5 * available to you under the terms of the GNU General Public License 6 * as published by the Free Software Foundation, either version 3 of 7 * the License, or (at your option) any later version. For more 8 * information, see COPYING. 9 */ 10 #endregion 11 12 using System.Collections.Generic; 13 using OpenRA.Primitives; 14 15 namespace OpenRA 16 { 17 public class WorldViewportSizes : IGlobalModData 18 { 19 public readonly int2 CloseWindowHeights = new int2(480, 600); 20 public readonly int2 MediumWindowHeights = new int2(600, 900); 21 public readonly int2 FarWindowHeights = new int2(900, 1300); 22 23 public readonly float MaxZoomScale = 2.0f; 24 public readonly int MaxZoomWindowHeight = 240; 25 public readonly bool AllowNativeZoom = true; 26 27 public readonly Size MinEffectiveResolution = new Size(1024, 720); 28 GetSizeRange(WorldViewport distance)29 public int2 GetSizeRange(WorldViewport distance) 30 { 31 return distance == WorldViewport.Close ? CloseWindowHeights 32 : distance == WorldViewport.Medium ? MediumWindowHeights 33 : FarWindowHeights; 34 } 35 } 36 } 37