Survivalcraft API 1.8.2.3 v1.8.2.3
Survivalcraft 2.4
载入中...
搜索中...
未找到
ScreenResolutionManager.cs
浏览该文件的文档.
1using Engine;
2
3namespace Game {
4 public static class ScreenResolutionManager {
5 public static float ApproximateScreenDpi { get; set; }
6
7 public static float ApproximateScreenInches =>
9
11 // TODO: fix screen dpi
12 ApproximateScreenDpi = 0.5f * (Window.ScreenSize.X / Window.Size.X + Window.ScreenSize.Y / Window.Size.Y);
13 ApproximateScreenDpi = Math.Clamp(ApproximateScreenDpi, 96f, 800f);
14 }
15 }
16}
static Point2 ScreenSize
static Point2 Size