mirror of
https://github.com/Stone-Red-Code/StoneRed.LogicSimulator.git
synced 2026-09-04 00:56:23 +02:00
Fix scaling
This commit is contained in:
@@ -20,7 +20,6 @@ namespace StoneRed.LogicSimulator;
|
||||
|
||||
internal class Srls : Game
|
||||
{
|
||||
public const ushort CurrentSaveVersion = 1;
|
||||
private readonly ScreenManager screenManager;
|
||||
private SrlsWindow? currentSrlsWindow = null;
|
||||
private SrlsScreen? currentSrlsScreen = null;
|
||||
@@ -38,6 +37,8 @@ internal class Srls : Game
|
||||
|
||||
public Settings Settings { get; set; }
|
||||
|
||||
public const ushort CurrentSaveVersion = 1;
|
||||
|
||||
public Srls()
|
||||
{
|
||||
Content.RootDirectory = "Content";
|
||||
@@ -120,7 +121,7 @@ internal class Srls : Game
|
||||
|
||||
protected override void Update(GameTime gameTime)
|
||||
{
|
||||
Scale = 1f / 800 * Window.ClientBounds.Height * Settings.Scale;
|
||||
Scale = 1f / 800 * Window.ClientBounds.Width * Settings.Scale;
|
||||
Desktop.Root.Scale = currentSrlsScreen?.ScalingEnabled == true ? new Vector2(Scale, Scale) : Vector2.One;
|
||||
|
||||
if (Desktop.ContextMenu is not null)
|
||||
|
||||
Reference in New Issue
Block a user