|
|
@@ -3,12 +3,24 @@ using System.Collections.Generic;
|
|
|
using UnityEngine;
|
|
|
using UnityEngine.UI;
|
|
|
using UnityEngine.Networking;
|
|
|
+using JCUnityLib;
|
|
|
/* 界面-用户协议和隐私政策 */
|
|
|
public class AgreementView : MonoBehaviour, MenuBackInterface
|
|
|
{
|
|
|
void Start()
|
|
|
{
|
|
|
PersistenHandler.ins?.menuBackCtr.views.Add(this);
|
|
|
+ AdaptSafeArea(transform.Find("ScrollView").transform as RectTransform);
|
|
|
+ }
|
|
|
+ void AdaptSafeArea(RectTransform rtf)
|
|
|
+ {
|
|
|
+ float offsetX = Screen.width - Screen.safeArea.width;
|
|
|
+ Vector2 offset = RectTransformUtils.ScreenV3ToCanvasV3(Vector3.right * offsetX, rtf);
|
|
|
+ if (rtf.anchorMin.x == 0 && rtf.anchorMax.x == 1)
|
|
|
+ {
|
|
|
+ rtf.offsetMin = rtf.offsetMin + offset;
|
|
|
+ rtf.offsetMax = rtf.offsetMax - offset;
|
|
|
+ }
|
|
|
}
|
|
|
void OnDestroy()
|
|
|
{
|