Kaynağa Gözat

用户协议弹窗翻译

lvjincheng 4 yıl önce
ebeveyn
işleme
f250d85e66

Dosya farkı çok büyük olduğundan ihmal edildi
+ 750 - 94
Assets/BowArrow/Scenes/Login.unity


+ 2 - 1
Assets/BowArrow/Scripts/Components/HyperlinkText.cs

@@ -70,6 +70,7 @@ public class HyperlinkText : Text, IPointerClickHandler
     #endregion
 
     #region 动作
+    public Action<string> onClickHref;
     public void OnPointerClick(PointerEventData eventData)
     {
         Vector2 localPoint;
@@ -86,7 +87,7 @@ public class HyperlinkText : Text, IPointerClickHandler
                     //打开网址
                     //this.Log("TextHyperlink", hyperlinkInfo.Name);
                     // Application.OpenURL(hyperlinkInfo.Name);
-                    Debug.Log(hyperlinkInfo.Name);
+                    onClickHref?.Invoke(hyperlinkInfo.Name);
                     return;
                 }
             }

+ 2 - 0
Assets/BowArrow/Scripts/Components/TextAutoLanguage2/Resources/TextAutoLanguage2/cn.json

@@ -75,6 +75,8 @@
     "game_crosshair_outbound_3": "瞄准方向已超出视野范围,请将弓往上移动!",
     "agreement_user": "用户协议",
     "agreement_privacy": "隐私政策",
+    "agreement_read_and_agree": "我已阅读并同意",
+    "agreement_and": "和",
     "tip_about-us": "关于我们-智能弓箭App!",
     "tip_friend-receive-request": "收到好友添加请求,可到好友界面查看!",
     "tip_pk_gametype_1": "静止靶PK",

+ 2 - 0
Assets/BowArrow/Scripts/Components/TextAutoLanguage2/Resources/TextAutoLanguage2/en.json

@@ -75,6 +75,8 @@
     "game_crosshair_outbound_3": "Aim out bound, please move the bow to the up!",
     "agreement_user": "User Agreement",
     "agreement_privacy": "Privacy Agreement",
+    "agreement_read_and_agree": "I have read and agreed to the",
+    "agreement_and": "and",
     "tip_about-us": "About us - Smart bow app !",
     "tip_friend-receive-request": "Has friend requet, can check at friend view!",
     "tip_pk_gametype_1": "Fixed Target PK",

+ 17 - 0
Assets/BowArrow/Scripts/Manager/LoginView/AgreementPopup.cs

@@ -4,6 +4,23 @@ using UnityEngine;
 
 public class AgreementPopup : MonoBehaviour
 {
+    void Awake() {
+        HyperlinkText hyperlinkText = null;
+        if (TextAutoLanguage2.GetLanguage() == LanguageEnum.Chinese) {
+            transform.Find("ContentBG").gameObject.SetActive(true);
+        } else {
+            Transform content = transform.Find("ContentBG_en");
+            content.gameObject.SetActive(true);
+            hyperlinkText = content.GetComponentInChildren<HyperlinkText>();
+        }
+        if (hyperlinkText) {
+            hyperlinkText.onClickHref += (val) => {
+                if (val == "a") EnterUserAgreement();
+                else if (val == "b") EnterPrivacyAgreement();
+            };
+        }
+    }
+    
     void Start()
     {
         if (PlayerPrefs.GetInt("AgreementPopupChecked", 0) == 1) {

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor