Parcourir la source

提交。。。

xyh2000 il y a 6 mois
Parent
commit
d12d4cb268

+ 92 - 16
Unity/Assets/Bundles/UI/UILogin.prefab

@@ -697,7 +697,7 @@ RectTransform:
   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: 70.241066, y: 2}
+  m_AnchoredPosition: {x: 116.241066, y: 89}
   m_SizeDelta: {x: 358.58, y: 43.4}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &2996973929519082656
@@ -902,7 +902,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!224 &6516524293090363809
 RectTransform:
   m_ObjectHideFlags: 0
@@ -915,6 +915,7 @@ RectTransform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children:
+  - {fileID: 8318048478156125714}
   - {fileID: 7087205228504464577}
   - {fileID: 6111800762819266795}
   - {fileID: 8522582509362593855}
@@ -925,10 +926,10 @@ RectTransform:
   - {fileID: 8119488429295199132}
   m_Father: {fileID: 587485265287676898}
   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: 0, y: 110}
-  m_SizeDelta: {x: 800, y: 500}
+  m_AnchorMin: {x: 0, y: 0}
+  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 &4450857608514667493
 CanvasRenderer:
@@ -951,15 +952,15 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
-  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_Color: {r: 0, g: 0, b: 0, a: 0.7490196}
   m_RaycastTarget: 1
   m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
   m_Maskable: 1
   m_OnCullStateChanged:
     m_PersistentCalls:
       m_Calls: []
-  m_Sprite: {fileID: 21300000, guid: 4f612cd167bda0b439f46aae2d06819f, type: 3}
-  m_Type: 0
+  m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
+  m_Type: 1
   m_PreserveAspect: 0
   m_FillCenter: 1
   m_FillMethod: 4
@@ -1283,7 +1284,7 @@ RectTransform:
   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: -190, y: 63.7}
+  m_AnchoredPosition: {x: -144, y: 150.7}
   m_SizeDelta: {x: 126, y: 32}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &6071264599170198179
@@ -1562,7 +1563,7 @@ RectTransform:
   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: 0, y: -116.3}
+  m_AnchoredPosition: {x: 46, y: -29.300003}
   m_SizeDelta: {x: 258, y: 97}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &4036405284748985905
@@ -2162,7 +2163,7 @@ RectTransform:
   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: 70.24107, y: 58}
+  m_AnchoredPosition: {x: 116.24107, y: 145}
   m_SizeDelta: {x: 358.582, y: 43.4}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &5523532531027378400
@@ -2823,7 +2824,7 @@ RectTransform:
   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: 0, y: 215}
+  m_AnchoredPosition: {x: 46, y: 302}
   m_SizeDelta: {x: 138, y: 36}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &2472340275736875270
@@ -2864,6 +2865,81 @@ MonoBehaviour:
   m_FillOrigin: 0
   m_UseSpriteMesh: 0
   m_PixelsPerUnitMultiplier: 1
+--- !u!1 &5027285706699135033
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 8318048478156125714}
+  - component: {fileID: 9030153802142310409}
+  - component: {fileID: 5924674658179537096}
+  m_Layer: 5
+  m_Name: bg
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &8318048478156125714
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 5027285706699135033}
+  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 6516524293090363809}
+  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: 46, y: 87}
+  m_SizeDelta: {x: 800, y: 500}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &9030153802142310409
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 5027285706699135033}
+  m_CullTransparentMesh: 1
+--- !u!114 &5924674658179537096
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 5027285706699135033}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_RaycastTarget: 1
+  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+  m_Maskable: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_Sprite: {fileID: 21300000, guid: 4f612cd167bda0b439f46aae2d06819f, type: 3}
+  m_Type: 0
+  m_PreserveAspect: 0
+  m_FillCenter: 1
+  m_FillMethod: 4
+  m_FillAmount: 1
+  m_FillClockwise: 1
+  m_FillOrigin: 0
+  m_UseSpriteMesh: 0
+  m_PixelsPerUnitMultiplier: 1
 --- !u!1 &5376853397618430239
 GameObject:
   m_ObjectHideFlags: 0
@@ -2899,7 +2975,7 @@ RectTransform:
   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: 353.5, y: 197.32}
+  m_AnchoredPosition: {x: 399.5, y: 284.32}
   m_SizeDelta: {x: 93, y: 88}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &2013715359559459835
@@ -3679,7 +3755,7 @@ RectTransform:
   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: -190, y: 5}
+  m_AnchoredPosition: {x: -144, y: 92}
   m_SizeDelta: {x: 126, y: 32}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &4500687399263553774
@@ -3995,7 +4071,7 @@ RectTransform:
   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: 3.5374, y: 36.39796}
+  m_AnchoredPosition: {x: 49.5374, y: 123.397964}
   m_SizeDelta: {x: 606.9252, y: 178.8041}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &6717780605447162058

+ 34 - 5
Unity/Assets/Scripts/Codes/HotfixView/Client/Demo/UI/UILogin/UILoginComponentSystem.cs

@@ -41,6 +41,16 @@ namespace ET.Client
                 self.closeTestBtn.GetComponent<Button>().onClick.AddListener(() => { self.CloseTestBtn(); });
                 self.testBtn = rc.Get<GameObject>("TestBtn");
                 self.testBtn.GetComponent<Button>().onClick.AddListener(() => { self.TestBtn(); });
+
+                self.IDObj = rc.Get<GameObject>("IDObj");
+                self.IDObj.SetActive(false);
+                self.IDObjRITH = rc.Get<GameObject>("IDObjRITH");
+                self.IDObjPASS = rc.Get<GameObject>("IDObjPASS");
+                self.IDSureBtn = rc.Get<GameObject>("IDSureBtn");
+                self.IDSureBtn.GetComponent<Button>().onClick.AddListener(() => { self.IDSureBtn(); });
+                self.IDCloseBtn = rc.Get<GameObject>("IDCloseBtn");
+                self.IDCloseBtn.GetComponent<Button>().onClick.AddListener(() => { self.IDCloseBtn(); });
+
                 self.Init();
             }
 		}
@@ -56,11 +66,12 @@ namespace ET.Client
 		public static async void OnLogin(this UILoginComponent self)
 		{
             await SoundManager.Instance.PlaySound("clickbtnsound");
-            LoginHelper.Login(
-				self.DomainScene(), 
-				self.account.GetComponent<InputField>().text, 
-				self.password.GetComponent<InputField>().text).Coroutine();
-		}
+            //        LoginHelper.Login(
+            //self.DomainScene(), 
+            //self.account.GetComponent<InputField>().text, 
+            //self.password.GetComponent<InputField>().text).Coroutine();
+            self.IDObj.SetActive(true);
+        }
 
 		public static void OnGetCode(this UILoginComponent self)
 		{
@@ -110,6 +121,24 @@ namespace ET.Client
                 int.Parse(self.inputPortObj.GetComponent<InputField>().text)).Coroutine();
         }
 
+        public static async void IDSureBtn(this UILoginComponent self)
+        {
+            await SoundManager.Instance.PlaySound("clickbtnsound");
+            //测试输入IP
+            LoginHelper.Login(
+                self.DomainScene(),
+                self.IDObjRITH.GetComponent<InputField>().text,
+                self.IDObjPASS.GetComponent<InputField>().text).Coroutine();
+        }
+
+        public static async void IDCloseBtn(this UILoginComponent self)
+        {
+            await SoundManager.Instance.PlaySound("clickbtnsound");
+            self.IDObjRITH.GetComponent<InputField>().text = "";
+            self.IDObjPASS.GetComponent<InputField>().text = "";
+            self.IDObj.SetActive(false);
+        }
+
         public static void CloseTestBtn(this UILoginComponent self)
         {
             self.inputIPObj.GetComponent<InputField>().text = "";

+ 6 - 0
Unity/Assets/Scripts/Codes/ModelView/Client/Demo/UI/UILogin/UILoginComponent.cs

@@ -22,5 +22,11 @@ namespace ET.Client
 		public GameObject closeTestBtn;
 		public GameObject testBtn;
 
+		public GameObject IDObj;
+		public GameObject IDObjRITH;
+		public GameObject IDObjPASS;
+		public GameObject IDSureBtn;
+		public GameObject IDCloseBtn;
+
     }
 }