zhaoyang %!s(int64=3) %!d(string=hai) anos
pai
achega
34264a8d1d

+ 1 - 1
FGUIProject/assets/DressUp/PhotographUI.xml

@@ -3,8 +3,8 @@
   <displayList>
     <loader id="n8_g3xa" name="btnBg" xy="0,0" size="1080,1920"/>
     <component id="n1_yd72" name="btnBack" src="9xlo8" fileName="components/ButtonBack1.xml" pkg="eg2y0ldp" xy="35,80"/>
+    <component id="n9_g3xa" name="comSelectBox" src="g3xa4l" fileName="ComChecked.xml" xy="0,0" pivot="0.5,0.5" anchor="true" size="382,450"/>
     <component id="n6_g3xa" name="btnChoose" src="g3xa4h" fileName="components/Button8.xml" xy="972,1016"/>
     <component id="n5_7dea" name="ComSelectRes" src="7dea4f" fileName="components/ComSelect.xml" xy="30,1174"/>
-    <component id="n9_g3xa" name="comSelectBox" src="g3xa4l" fileName="ComChecked.xml" xy="388,295" size="382,450"/>
   </displayList>
 </component>

+ 4 - 4
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/DressUp/UI_PhotographUI.cs

@@ -9,9 +9,9 @@ namespace UI.DressUp
         public GComponent target;
         public GLoader m_btnBg;
         public GButton m_btnBack;
+        public UI_ComChecked m_comSelectBox;
         public GButton m_btnChoose;
         public UI_ComSelect m_ComSelectRes;
-        public UI_ComChecked m_comSelectBox;
         public const string URL = "ui://mbo439wbbe944a";
         public const string PACKAGE_NAME = "DressUp";
         public const string RES_NAME = "PhotographUI";
@@ -61,19 +61,19 @@ namespace UI.DressUp
         {
             m_btnBg = (GLoader)comp.GetChild("btnBg");
             m_btnBack = (GButton)comp.GetChild("btnBack");
+            m_comSelectBox = (UI_ComChecked)UI_ComChecked.Create(comp.GetChild("comSelectBox"));
             m_btnChoose = (GButton)comp.GetChild("btnChoose");
             m_ComSelectRes = (UI_ComSelect)UI_ComSelect.Create(comp.GetChild("ComSelectRes"));
-            m_comSelectBox = (UI_ComChecked)UI_ComChecked.Create(comp.GetChild("comSelectBox"));
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_btnBg = null;
             m_btnBack = null;
+            m_comSelectBox.Dispose();
+            m_comSelectBox = null;
             m_btnChoose = null;
             m_ComSelectRes.Dispose();
             m_ComSelectRes = null;
-            m_comSelectBox.Dispose();
-            m_comSelectBox = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 7 - 2
GameClient/Assets/Game/HotUpdate/Views/DressUp/PhotographView.cs

@@ -233,11 +233,16 @@ namespace GFGGame
         private void ControllerSelectBoxPos(GameObject hitParentGameObj)
         {
             SceneController.SetGameObjectCenter(hitParentGameObj);
+            Debug.Log("物体世界坐标:" + hitParentGameObj.transform.position);
             //位置:角色、道具、npc全用对应父物体的位置
             Vector2 objScreenPos = Camera.main.WorldToScreenPoint(hitParentGameObj.transform.position);
-            // Vector2 localPos = new Vector2(objScreenPos.x + _ui.m_comSelectBox.target.width * 0.5f, (Screen.height - objScreenPos.y) + _ui.m_comSelectBox.target.height * 0.5f);
+            Debug.Log("物体屏幕坐标:" + hitParentGameObj.transform.position);
+            Debug.Log("屏幕高:" + Screen.height);
             Vector2 localPos = new Vector2(objScreenPos.x, (Screen.height - objScreenPos.y));
+            Debug.Log("选框坐标:" + _ui.m_comSelectBox.target.position);
+
             _ui.m_comSelectBox.target.position = localPos;//(localPos.x, localPos.y);
+            Debug.Log("选框坐标:" + _ui.m_comSelectBox.target.position);
 
         }
 
@@ -260,7 +265,7 @@ namespace GFGGame
 
             RotationGesture gesture = (RotationGesture)context.sender;
             hitParentGameObj.transform.Rotate(Vector3.forward, -gesture.delta, Space.World);
-            _ui.m_comSelectBox.target.rotation = -gesture.delta;
+            _ui.m_comSelectBox.target.rotation += -gesture.delta;
         }
         //背景
         private void UpdateBgOrNpcOrBorder(EnumPhotographType type, int itemId)

BIN=BIN
GameClient/Assets/ResIn/UI/DressUp/DressUp_atlas0!a.png


BIN=BIN
GameClient/Assets/ResIn/UI/DressUp/DressUp_atlas0.png


BIN=BIN
GameClient/Assets/ResIn/UI/DressUp/DressUp_fui.bytes