Add Graphics.UIScale setting to modify UI size.

This commit is contained in:
Paul Chote
2019-12-25 18:00:04 +00:00
committed by teinarss
parent ce445f993c
commit 6388a6bff4
12 changed files with 78 additions and 42 deletions

View File

@@ -193,14 +193,13 @@ namespace OpenRA.Graphics
// Cursor is rendered in native window coordinates
// Apply same scaling rules as hardware cursors
var ws = Game.Renderer.WindowScale;
if (ws > 1.5f)
if (Game.Renderer.NativeWindowScale > 1.5f)
cursorSize = 2 * cursorSize;
var mousePos = isLocked ? lockedPosition : Viewport.LastMousePos;
renderer.RgbaSpriteRenderer.DrawSprite(cursorSprite,
mousePos,
cursorSize / ws);
cursorSize / Game.Renderer.WindowScale);
}
public void Lock()