Add UI Scale dropdown to the settings menu.
This commit is contained in:
@@ -57,6 +57,7 @@ namespace OpenRA
|
||||
IHardwareCursor CreateHardwareCursor(string name, Size size, byte[] data, int2 hotspot, bool pixelDouble);
|
||||
void SetHardwareCursor(IHardwareCursor cursor);
|
||||
void SetRelativeMouseMode(bool mode);
|
||||
void SetScaleModifier(float scale);
|
||||
}
|
||||
|
||||
public interface IGraphicsContext : IDisposable
|
||||
|
||||
@@ -91,6 +91,11 @@ namespace OpenRA
|
||||
return new Size(size.X, size.Y);
|
||||
}
|
||||
|
||||
public void SetUIScale(float scale)
|
||||
{
|
||||
Window.SetScaleModifier(scale);
|
||||
}
|
||||
|
||||
public void InitializeFonts(ModData modData)
|
||||
{
|
||||
if (Fonts != null)
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.Primitives;
|
||||
|
||||
namespace OpenRA
|
||||
{
|
||||
@@ -23,6 +24,8 @@ namespace OpenRA
|
||||
public readonly int MaxZoomWindowHeight = 240;
|
||||
public readonly bool AllowNativeZoom = true;
|
||||
|
||||
public readonly Size MinEffectiveResolution = new Size(1024, 720);
|
||||
|
||||
public int2 GetSizeRange(WorldViewport distance)
|
||||
{
|
||||
return distance == WorldViewport.Close ? CloseWindowHeights
|
||||
|
||||
Reference in New Issue
Block a user