部分界面适配修改

dev_chengFeng
gaoxin 2020-07-28 17:00:19 +08:00
parent 5f6783fc13
commit 5d6586a9a5
3 changed files with 25 additions and 13 deletions

View File

@ -5366,9 +5366,9 @@ RectTransform:
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 541, y: 961}
m_SizeDelta: {x: 1080, y: 1920}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &921277676
CanvasRenderer:
@ -51126,7 +51126,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchoredPosition: {x: 50, y: 0}
m_SizeDelta: {x: 100, y: 185}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1473222624206509369
@ -61539,7 +61539,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchoredPosition: {x: 50, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &5551596210412472397

View File

@ -1496,7 +1496,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fcf53bbee510dca40b2f81e3c0d426c6, type: 3}
m_Name:
m_EditorClassIdentifier:
tweenSequeue1:
tweenSequeue:
- initV3: {x: 0, y: 0, z: 0}
initFloat: 1
@ -2794,9 +2793,9 @@ RectTransform:
m_Father: {fileID: 7565913136373196857}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 37.7, y: 499.8}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 37.7, y: -460.2}
m_SizeDelta: {x: 0, y: 2}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1175462737290454025
@ -3527,7 +3526,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fcf53bbee510dca40b2f81e3c0d426c6, type: 3}
m_Name:
m_EditorClassIdentifier:
tweenSequeue1:
tweenSequeue:
- initV3: {x: 0, y: 0, z: 0}
initFloat: 1
@ -4365,7 +4363,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fcf53bbee510dca40b2f81e3c0d426c6, type: 3}
m_Name:
m_EditorClassIdentifier:
tweenSequeue1:
tweenSequeue:
- initV3: {x: 0, y: 0, z: 0}
initFloat: 1
@ -8004,7 +8001,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fcf53bbee510dca40b2f81e3c0d426c6, type: 3}
m_Name:
m_EditorClassIdentifier:
tweenSequeue1:
tweenSequeue:
- initV3: {x: 0, y: 0, z: 0}
initFloat: 1
@ -20840,7 +20836,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fcf53bbee510dca40b2f81e3c0d426c6, type: 3}
m_Name:
m_EditorClassIdentifier:
tweenSequeue1:
tweenSequeue:
- initV3: {x: 0, y: 0, z: 0}
initFloat: 1

View File

@ -115,6 +115,23 @@ function UIManager.Adapter()
rectTransform.offsetMin = Vector2.New(rectTransform.offsetMin.x, rectTransform.offsetMin.y + UIManager.Offset.Bottom)
rectTransform.offsetMax = Vector2.New(rectTransform.offsetMax.x, rectTransform.offsetMax.y - UIManager.Offset.Top)
rectTransform = this.screenMask1:GetComponent("RectTransform")
rectTransform.anchorMin = Vector2.New(0, 1)
rectTransform.anchorMax = Vector2.New(1, 1)
rectTransform.offsetMin = Vector2.New(0, 0)
rectTransform.offsetMax = Vector2.New(0, 0)
rectTransform.pivot = Vector2.New(0.5, 1)
rectTransform.sizeDelta = Vector2.New(0, UIManager.Offset.Top)
rectTransform = this.screenMask2:GetComponent("RectTransform")
rectTransform.anchorMin = Vector2.New(0, 0)
rectTransform.anchorMax = Vector2.New(1, 0)
rectTransform.offsetMin = Vector2.New(0, 0)
rectTransform.offsetMax = Vector2.New(0, 0)
rectTransform.pivot = Vector2.New(0.5, 0)
rectTransform.sizeDelta = Vector2.New(0, UIManager.Offset.Bottom)
elseif n < standard then
local w = 1920 / Screen.height * Screen.width
local f = (w-1080) / 2