下边添加适配效果
parent
3df07f557c
commit
aabec9c31d
|
|
@ -98,7 +98,7 @@ function UIManager.Adapter()
|
||||||
end
|
end
|
||||||
UIManager.Offset = {
|
UIManager.Offset = {
|
||||||
Top = 48,
|
Top = 48,
|
||||||
Bottom = 0,
|
Bottom = 24,
|
||||||
Left = 0,
|
Left = 0,
|
||||||
Right = 0,
|
Right = 0,
|
||||||
}
|
}
|
||||||
|
|
@ -138,6 +138,9 @@ function UIManager.Adapter()
|
||||||
|
|
||||||
|
|
||||||
elseif n < standard then
|
elseif n < standard then
|
||||||
|
-- 计算屏幕比例的比值,用于部分界面进行屏幕适配的缩放
|
||||||
|
UIManager.adapterScale = 1
|
||||||
|
|
||||||
local w = 1920 / Screen.height * Screen.width
|
local w = 1920 / Screen.height * Screen.width
|
||||||
local f = (w-1080) / 2
|
local f = (w-1080) / 2
|
||||||
local rectTransform = this.uiNode.gameObject:GetComponent("RectTransform")
|
local rectTransform = this.uiNode.gameObject:GetComponent("RectTransform")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue