Răsfoiți Sursa

认证和登录界面

lvjincheng 3 ani în urmă
părinte
comite
5210b5a0a5

+ 7 - 7
Assets/BowArrow/Scenes/Login.unity

@@ -192,7 +192,7 @@ MonoBehaviour:
     m_Alignment: 3
     m_AlignByGeometry: 0
     m_RichText: 1
-    m_HorizontalOverflow: 0
+    m_HorizontalOverflow: 1
     m_VerticalOverflow: 0
     m_LineSpacing: 1
   m_Text: "\u6CE8\u518C"
@@ -3823,7 +3823,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: 35.64017, y: 0}
+  m_AnchoredPosition: {x: 35.291496, y: 0}
   m_SizeDelta: {x: 0, y: 0}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!114 &355551584
@@ -6174,7 +6174,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: 116.561165, y: 0}
+  m_AnchoredPosition: {x: 117.346825, y: 0}
   m_SizeDelta: {x: 0, y: 0}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!114 &750604318
@@ -10990,7 +10990,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: 249.7287, y: 0}
+  m_AnchoredPosition: {x: 251.74898, y: 0}
   m_SizeDelta: {x: 0, y: 0}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!114 &1549087752
@@ -11527,7 +11527,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: 376.24466, y: 0}
+  m_AnchoredPosition: {x: 379.3873, y: 0}
   m_SizeDelta: {x: 0, y: 0}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!114 &1628073323
@@ -13551,7 +13551,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: 115.14517, y: 0}
+  m_AnchoredPosition: {x: 114.43001, y: 0}
   m_SizeDelta: {x: 0, y: 0}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!114 &1847328316
@@ -14037,7 +14037,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: 312.98666, y: 0}
+  m_AnchoredPosition: {x: 315.56815, y: 0}
   m_SizeDelta: {x: 0, y: 0}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!114 &1900702359

+ 9 - 0
Assets/BowArrow/Scripts/Manager/HomeMgr.cs

@@ -1,6 +1,7 @@
 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
+using UnityEngine.UI;
 
 public class HomeMgr : MonoBehaviour
 {
@@ -50,4 +51,12 @@ public class HomeMgr : MonoBehaviour
     public void ShowAuthLoginMask(bool visiable) {
         transform.Find("AuthLoginMask").gameObject.SetActive(visiable);
     }
+
+    public void SetAuthLoginText(string text) {
+        transform.Find("AuthLoginMask").GetComponentInChildren<Text>().text = text;
+    }
+
+    public bool IsAuthLoginMaskActive() {
+        return transform.Find("AuthLoginMask").gameObject.activeSelf;
+    }
 }

+ 5 - 1
Assets/BowArrow/Scripts/Network/UserPlayer.cs

@@ -86,7 +86,11 @@ public class UserPlayer : JCEntity
             //clear token info
             PlayerPrefs.DeleteKey("IdAndToken");
             //tip
-            PopupMgr.ins.ShowTip(TextAutoLanguage2.GetTextByCNKey("登录认证过期"));
+            if (HomeMgr.ins && HomeMgr.ins.IsAuthLoginMaskActive()) {
+                HomeMgr.ins.SetAuthLoginText(TextAutoLanguage2.GetTextByCNKey("登录认证过期"));
+            } else {
+                PopupMgr.ins.ShowTip(TextAutoLanguage2.GetTextByCNKey("登录认证过期"));
+            }
             //delay back login or quit
             Sequence seq = DOTween.Sequence();
             seq.AppendInterval(1.5f);