fix: label positions and sizes
This commit is contained in:
@@ -53,11 +53,11 @@ public class CameraController : Behaviour, IFirstFrameUpdate, IUpdate
|
||||
cameraBehaviour.Graphics.IsFullScreen = true;
|
||||
cameraBehaviour.Graphics.ApplyChanges();
|
||||
|
||||
float previousScreenSize = Math.Sqrt(Math.Sqr(cameraBehaviour.Viewport.Width) + Math.Sqr(cameraBehaviour.Viewport.Height));
|
||||
float previousScreenSize = Math.Sqrt(Math.Sqr(cameraBehaviour.Viewport.X) + Math.Sqr(cameraBehaviour.Viewport.Y));
|
||||
float currentScreenSize = Math.Sqrt(Math.Sqr(cameraBehaviour.Graphics.GraphicsDevice.Viewport.Width) + Math.Sqr(cameraBehaviour.Graphics.GraphicsDevice.Viewport.Height));
|
||||
defaultZoomLevel /= previousScreenSize / currentScreenSize;
|
||||
cameraBehaviour.Zoom /= previousScreenSize / currentScreenSize;
|
||||
cameraBehaviour.Viewport = cameraBehaviour.Graphics.GraphicsDevice.Viewport;
|
||||
cameraBehaviour.Viewport = new(cameraBehaviour.Graphics.GraphicsDevice.Viewport.Width, cameraBehaviour.Graphics.GraphicsDevice.Viewport.Height);
|
||||
}
|
||||
|
||||
private void ResetCamera(IButtonInputs<Keys> sender, IButtonInputs<Keys>.ButtonCallbackArguments args)
|
||||
|
||||
Reference in New Issue
Block a user