更新窗口大小逻辑

pull/1/head
PJ568 10 months ago
parent 2bb3518f66
commit 75837701ee

@ -88,6 +88,8 @@ func 初始化语言设置():
func ():
# 获取系统类型
var sys_name := OS.get_name()
if sys_name != "Android" and sys_name != "iOS" and sys_name != "Web":
# 根据系统类型判断是否调整窗口DPI
if sys_name == "Windows" or sys_name == "macOS" or sys_name == "Linux" or sys_name == "BSD":
get_viewport().size = Vector2(DisplayServer.screen_get_dpi() * 3.5, DisplayServer.screen_get_dpi() * 6.2)

@ -27,6 +27,7 @@ Global="*res://Scripts/全局.gd"
window/size/viewport_width=720
window/size/viewport_height=1220
window/size/initial_position_type=3
window/stretch/mode="canvas_items"
window/stretch/aspect="expand"
window/handheld/orientation=1

Loading…
Cancel
Save