Survivalcraft API 1.8.2.3
v1.8.2.3
Survivalcraft 2.4
载入中...
搜索中...
未找到
ScreenResolutionManager.cs
浏览该文件的文档.
1
using
Engine
;
2
3
namespace
Game
{
4
public
static
class
ScreenResolutionManager
{
5
public
static
float
ApproximateScreenDpi
{
get
;
set
; }
6
7
public
static
float
ApproximateScreenInches
=>
8
MathF.Sqrt(
Window
.
ScreenSize
.
X
*
Window
.
ScreenSize
.
X
+
Window
.
ScreenSize
.
Y
*
Window
.
ScreenSize
.
Y
) /
ApproximateScreenDpi
;
9
10
static
ScreenResolutionManager
() {
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
}
Engine.Window
定义
Window.cs:36
Engine.Window.ScreenSize
static Point2 ScreenSize
定义
Window.cs:72
Engine.Window.Size
static Point2 Size
定义
Window.cs:203
Game.ScreenResolutionManager.ApproximateScreenInches
static float ApproximateScreenInches
定义
ScreenResolutionManager.cs:7
Game.ScreenResolutionManager.ScreenResolutionManager
static ScreenResolutionManager()
定义
ScreenResolutionManager.cs:10
Game.ScreenResolutionManager.ApproximateScreenDpi
static float ApproximateScreenDpi
定义
ScreenResolutionManager.cs:5
Engine
定义
BaseSound.cs:10
Game
定义
ContentFileBridge.cs:4
Engine.Point2.Y
int Y
定义
Point2.cs:5
Engine.Point2.X
int X
定义
Point2.cs:3
SurvivalcraftApi 1.8.2.3
Survivalcraft.Windows
Managers
ScreenResolutionManager.cs
制作者
1.16.1