zhaoyang 3 жил өмнө
parent
commit
5912d61a2c
42 өөрчлөгдсөн 285 нэмэгдсэн , 100 устгасан
  1. 7 7
      FGUIProject/assets/DressUp/ComChecked.xml
  2. 7 3
      FGUIProject/assets/DressUp/PhotographUI.xml
  3. 2 7
      FGUIProject/assets/DressUp/components/Button10.xml
  4. 4 6
      FGUIProject/assets/DressUp/components/Button11.xml
  5. 7 10
      FGUIProject/assets/DressUp/components/Button7.xml
  6. 2 2
      FGUIProject/assets/DressUp/components/Button8.xml
  7. 5 5
      FGUIProject/assets/DressUp/components/Button9.xml
  8. 9 19
      FGUIProject/assets/DressUp/components/ComSelect.xml
  9. 22 0
      FGUIProject/assets/DressUp/components/Component2.xml
  10. 9 2
      FGUIProject/assets/DressUp/components/ListItem.xml
  11. BIN
      FGUIProject/assets/DressUp/images/pz_bjanniu_1.png
  12. BIN
      FGUIProject/assets/DressUp/images/pz_bjanniu_2.png
  13. BIN
      FGUIProject/assets/DressUp/images/pz_bjanniu_3.png
  14. BIN
      FGUIProject/assets/DressUp/images/pz_bjkuang.png
  15. BIN
      FGUIProject/assets/DressUp/images/pz_dituhua.png
  16. BIN
      FGUIProject/assets/DressUp/images/pz_dktu_1.png
  17. BIN
      FGUIProject/assets/DressUp/images/pz_dktu_2.png
  18. BIN
      FGUIProject/assets/DressUp/images/pz_icon_1.png
  19. BIN
      FGUIProject/assets/DressUp/images/pz_icon_2.png
  20. BIN
      FGUIProject/assets/DressUp/images/pz_icon_3.png
  21. BIN
      FGUIProject/assets/DressUp/images/pz_icon_4.png
  22. BIN
      FGUIProject/assets/DressUp/images/pz_jtkuang.png
  23. BIN
      FGUIProject/assets/DressUp/images/pz_xzanniu.png
  24. BIN
      FGUIProject/assets/DressUp/images/pz_xzkuang.png
  25. BIN
      FGUIProject/assets/DressUp/images/pz_xzzi_1.png
  26. BIN
      FGUIProject/assets/DressUp/images/pz_xzzi_2.png
  27. BIN
      FGUIProject/assets/DressUp/images/pz_xzzi_3.png
  28. BIN
      FGUIProject/assets/DressUp/images/pz_xzzi_4.png
  29. BIN
      FGUIProject/assets/DressUp/images/pz_xzzi_5.png
  30. BIN
      FGUIProject/assets/DressUp/images/pz_xzzikuang.png
  31. 22 1
      FGUIProject/assets/DressUp/package.xml
  32. 4 5
      GameClient/Assets/Game/HotUpdate/DressUp/SceneController.cs
  33. 3 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/DressUp/UI_ComChecked.cs
  34. 4 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/DressUp/UI_ComSelect.cs
  35. 71 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/DressUp/UI_Component2.cs
  36. 11 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/DressUp/UI_Component2.cs.meta
  37. 9 6
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/DressUp/UI_ListItem.cs
  38. 3 3
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/DressUp/UI_PhotographUI.cs
  39. 84 24
      GameClient/Assets/Game/HotUpdate/Views/DressUp/PhotographView.cs
  40. BIN
      GameClient/Assets/ResIn/UI/DressUp/DressUp_atlas0!a.png
  41. BIN
      GameClient/Assets/ResIn/UI/DressUp/DressUp_atlas0.png
  42. BIN
      GameClient/Assets/ResIn/UI/DressUp/DressUp_fui.bytes

+ 7 - 7
FGUIProject/assets/DressUp/ComChecked.xml

@@ -1,16 +1,16 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="446,291">
+<component size="446,291" anchor="true">
   <displayList>
-    <image id="n9_g3xa" name="n9" src="7dea4g" fileName="images/kp_kprk_4.png" xy="32,35" size="381,220">
+    <image id="n9_g3xa" name="imgBox" src="xmtl51" fileName="images/pz_bjkuang.png" xy="35,35" size="375,224">
       <relation target="" sidePair="width-width,height-height"/>
     </image>
-    <component id="n10_g3xa" name="btnDelete" src="g3xa4i" fileName="components/Button9.xml" xy="356,-10">
-      <relation target="" sidePair="right-right,top-top"/>
-    </component>
-    <component id="n11_g3xa" name="btnFlip" src="g3xa4j" fileName="components/Button10.xml" xy="0,6" size="82,62" aspect="true">
+    <component id="n10_g3xa" name="btnDelete" src="g3xa4i" fileName="components/Button9.xml" xy="0,0">
       <relation target="" sidePair="left-left,top-top"/>
     </component>
-    <component id="n12_g3xa" name="btnSize" src="g3xa4k" fileName="components/Button11.xml" xy="373,209">
+    <component id="n11_g3xa" name="btnFlip" src="g3xa4j" fileName="components/Button10.xml" xy="374,0">
+      <relation target="" sidePair="right-right,top-top"/>
+    </component>
+    <component id="n12_g3xa" name="btnSize" src="g3xa4k" fileName="components/Button11.xml" xy="374,219">
       <relation target="" sidePair="right-right,bottom-bottom"/>
     </component>
   </displayList>

+ 7 - 3
FGUIProject/assets/DressUp/PhotographUI.xml

@@ -2,9 +2,13 @@
 <component size="1080,1920" overflow="hidden" scroll="both">
   <displayList>
     <loader id="n8_g3xa" name="btnBg" xy="0,0" size="1080,1920"/>
+    <component id="n9_g3xa" name="comSelectBox" src="g3xa4l" fileName="ComChecked.xml" xy="420,728" pivot="0.5,0.5" anchor="true"/>
     <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="n6_g3xa" name="btnChoose" src="g3xa4h" fileName="components/Button8.xml" xy="924,803">
+      <relation target="" sidePair="bottom-bottom"/>
+    </component>
+    <component id="n5_7dea" name="ComSelectRes" src="7dea4f" fileName="components/ComSelect.xml" xy="0,1086">
+      <relation target="" sidePair="center-center,bottom-bottom"/>
+    </component>
   </displayList>
 </component>

+ 2 - 7
FGUIProject/assets/DressUp/components/Button10.xml

@@ -1,13 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="48,36" extention="Button">
+<component size="72,72" extention="Button">
   <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
   <displayList>
-    <image id="n0_g3xa" name="n0" src="q08x4" fileName="images/hz_dakai.png" xy="0,1">
-      <relation target="" sidePair="width-width,height-height"/>
-    </image>
-    <image id="n1_g3xa" name="n1" src="q08x4" fileName="images/hz_dakai.png" xy="24,1" flip="hz">
-      <relation target="" sidePair="width-width,height-height"/>
-    </image>
+    <image id="n2_xmtl" name="n2" src="xmtl53" fileName="images/pz_bjanniu_2.png" xy="0,0"/>
   </displayList>
   <Button/>
 </component>

+ 4 - 6
FGUIProject/assets/DressUp/components/Button11.xml

@@ -1,10 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="66,66" extention="Button">
-  <Button/>
-  <controller name="button" pages="0,up,1,down,2,over,3,selectedOver"/>
+<component size="72,72" extention="Button">
+  <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
   <displayList>
-    <image id="n0_g3xa" src="k6he17" name="n0" xy="0,0">
-      <relation target="" sidePair="width,height"/>
-    </image>
+    <image id="n1_xmtl" name="n1" src="xmtl52" fileName="images/pz_bjanniu_3.png" xy="0,0"/>
   </displayList>
+  <Button/>
 </component>

+ 7 - 10
FGUIProject/assets/DressUp/components/Button7.xml

@@ -1,17 +1,14 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="160,56" extention="Button">
-  <controller name="button" pages="0,up,1,down" selected="0"/>
+<component size="265,139" extention="Button">
+  <controller name="button" pages="0,up,1,down" selected="1"/>
   <displayList>
-    <loader id="n2_ih75" name="icon" xy="0,0" size="160,56" url="ui://mbo439wbih7536" autoSize="true"/>
-    <text id="n1_ih75" name="title" xy="0,-2" size="160,56" fontSize="42" color="#fff7eb" align="center" vAlign="middle" autoSize="none" singleLine="true" text="礼服">
-      <relation target="" sidePair="width-width,height-height"/>
-    </text>
-    <image id="n4_ih75" name="n4" src="ih7535" fileName="images/sxsx_fgdian.png" xy="0,0">
-      <gearDisplay controller="button" pages="1"/>
-    </image>
-    <image id="n5_ih75" name="n5" src="ih7534" fileName="images/sxsx_dgdg.png" xy="49,1">
+    <image id="n5_ih75" name="n5" src="xmtl4q" fileName="images/pz_xzzikuang.png" xy="0,0">
       <gearDisplay controller="button" pages="1"/>
     </image>
+    <loader id="n2_ih75" name="icon" xy="79,46" size="106,69" url="ui://mbo439wbxmtl4p" autoSize="true"/>
+    <text id="n1_ih75" name="title" xy="0,-2" size="265,139" fontSize="42" color="#fff7eb" align="center" vAlign="middle" autoSize="none" singleLine="true" text="">
+      <relation target="" sidePair="width-width,height-height"/>
+    </text>
   </displayList>
   <Button mode="Radio"/>
 </component>

+ 2 - 2
FGUIProject/assets/DressUp/components/Button8.xml

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="66,66" extention="Button">
+<component size="125,125" extention="Button">
   <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
   <displayList>
-    <loader id="n1_g3xa" name="n1" xy="0,0" size="66,66" url="ui://mbo439wbk6he17" autoSize="true"/>
+    <loader id="n1_g3xa" name="n1" xy="0,0" size="125,125" url="ui://mbo439wbxmtl4s" autoSize="true"/>
   </displayList>
   <Button/>
 </component>

+ 5 - 5
FGUIProject/assets/DressUp/components/Button9.xml

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="91,92" extention="Button">
-  <Button/>
-  <controller name="button" pages="0,up,1,down,2,over,3,selectedOver"/>
+<component size="72,72" extention="Button">
+  <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
   <displayList>
-    <image id="n0_g3xa" src="ih753m" name="n0" xy="0,0">
-      <relation target="" sidePair="width,height"/>
+    <image id="n0_g3xa" name="n0" src="xmtl4m" fileName="images/pz_bjanniu_1.png" xy="0,0">
+      <relation target="" sidePair="width-width,height-height"/>
     </image>
   </displayList>
+  <Button/>
 </component>

+ 9 - 19
FGUIProject/assets/DressUp/components/ComSelect.xml

@@ -1,9 +1,14 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="1020,746">
+<component size="1080,834">
   <controller name="c1" pages="0,,1,,2,,3,,4," selected="0"/>
   <displayList>
-    <loader id="n5_7dea" name="n5" xy="0,73" size="1020,673" url="ui://mbo439wb7dea4b" fill="scaleFree"/>
-    <list id="n8_7dea" name="list" xy="33,115" size="953,595" layout="flow_hz" overflow="scroll" lineGap="40" colGap="50" defaultItem="ui://mbo439wb7dea4e">
+    <image id="n15_xmtl" name="n15" src="xmtl4z" fileName="images/pz_dktu_1.png" xy="0,0"/>
+    <loader id="n5_7dea" name="n5" xy="0,192" size="1080,642" url="ui://mbo439wbxmtl4y" fill="scaleFree" autoSize="true"/>
+    <list id="n8_7dea" name="list" xy="-4,191" size="1088,644" layout="flow_hz" overflow="scroll" defaultItem="ui://mbo439wbxmtl57">
+      <item/>
+      <item/>
+      <item/>
+      <item/>
       <item/>
       <item/>
       <item/>
@@ -13,21 +18,6 @@
       <item/>
       <item/>
     </list>
-    <component id="n9_7dea" name="n9" src="7dea4c" fileName="components/Button7.xml" xy="0,0" group="n14_7dea">
-      <Button title="背景" controller="c1" page="0"/>
-    </component>
-    <component id="n10_7dea" name="n10" src="7dea4c" fileName="components/Button7.xml" xy="180,0" group="n14_7dea">
-      <Button title="NPC" controller="c1" page="1"/>
-    </component>
-    <component id="n11_7dea" name="n11" src="7dea4c" fileName="components/Button7.xml" xy="360,0" group="n14_7dea">
-      <Button title="道具" controller="c1" page="2"/>
-    </component>
-    <component id="n12_7dea" name="n12" src="7dea4c" fileName="components/Button7.xml" xy="540,0" group="n14_7dea">
-      <Button title="边框" controller="c1" page="3"/>
-    </component>
-    <component id="n13_7dea" name="n13" src="7dea4c" fileName="components/Button7.xml" xy="720,0" group="n14_7dea">
-      <Button title="滤镜" controller="c1" page="4"/>
-    </component>
-    <group id="n14_7dea" name="n14" xy="0,0" size="880,56" advanced="true" layout="hz" colGap="20" excludeInvisibles="true"/>
+    <component id="n9_7dea" name="comBtnTab" src="xmtl56" fileName="components/Component2.xml" xy="0,63"/>
   </displayList>
 </component>

+ 22 - 0
FGUIProject/assets/DressUp/components/Component2.xml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="1080,139" overflow="scroll" scroll="horizontal">
+  <controller name="c1" pages="1,,2,,3,,4,,5," selected="1"/>
+  <displayList>
+    <component id="n9_7dea" name="n9" src="7dea4c" fileName="components/Button7.xml" xy="-8,0" size="265,139" group="n14_7dea">
+      <Button icon="ui://mbo439wbxmtl4p" controller="c1" page="1"/>
+    </component>
+    <component id="n10_7dea" name="n10" src="7dea4c" fileName="components/Button7.xml" xy="257,0" size="265,139" group="n14_7dea">
+      <Button checked="true" icon="ui://mbo439wbxmtl4o" controller="c1" page="2"/>
+    </component>
+    <component id="n11_7dea" name="n11" src="7dea4c" fileName="components/Button7.xml" xy="522,0" size="265,139" group="n14_7dea">
+      <Button checked="true" icon="ui://mbo439wbxmtl4n" controller="c1" page="3"/>
+    </component>
+    <component id="n12_7dea" name="n12" src="7dea4c" fileName="components/Button7.xml" xy="787,0" size="265,139" group="n14_7dea">
+      <Button icon="ui://mbo439wbxmtl54" controller="c1" page="4"/>
+    </component>
+    <component id="n13_7dea" name="n13" src="7dea4c" fileName="components/Button7.xml" xy="1052,0" size="265,139" group="n14_7dea">
+      <Button icon="ui://mbo439wbxmtl55" controller="c1" page="5"/>
+    </component>
+    <group id="n14_7dea" name="n14" xy="-8,0" size="1325,139" advanced="true" layout="hz" excludeInvisibles="true"/>
+  </displayList>
+</component>

+ 9 - 2
FGUIProject/assets/DressUp/components/ListItem.xml

@@ -1,6 +1,13 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="200,300" overflow="hidden">
+<component size="272,272" extention="Button">
+  <controller name="button" pages="0,up,1,down" selected="0"/>
   <displayList>
-    <loader id="n9_7dea" name="loaIcon" xy="0,0" size="200,300" aspect="true" url="ui://mbo439wb7dea4d" fill="scaleMatchWidth"/>
+    <loader id="n3_xmtl" name="loaIcon" xy="36,36" size="200,200" url="ui://mbo439wb7dea4d" fill="scaleFree"/>
+    <image id="n4_xmtl" name="n4" src="xmtl50" fileName="images/pz_dituhua.png" xy="62,62"/>
+    <image id="n5_xmtl" name="n5" src="xmtl4r" fileName="images/pz_xzkuang.png" xy="20,20">
+      <gearDisplay controller="button" pages="1"/>
+    </image>
+    <text id="n6_xmtl" name="txtName" xy="136,185" pivot="0.5,0" anchor="true" size="206,46" fontSize="34" color="#e0f0da" strokeColor="#737f6e" text="沧海月明·月"/>
   </displayList>
+  <Button mode="Radio"/>
 </component>

BIN
FGUIProject/assets/DressUp/images/pz_bjanniu_1.png


BIN
FGUIProject/assets/DressUp/images/pz_bjanniu_2.png


BIN
FGUIProject/assets/DressUp/images/pz_bjanniu_3.png


BIN
FGUIProject/assets/DressUp/images/pz_bjkuang.png


BIN
FGUIProject/assets/DressUp/images/pz_dituhua.png


BIN
FGUIProject/assets/DressUp/images/pz_dktu_1.png


BIN
FGUIProject/assets/DressUp/images/pz_dktu_2.png


BIN
FGUIProject/assets/DressUp/images/pz_icon_1.png


BIN
FGUIProject/assets/DressUp/images/pz_icon_2.png


BIN
FGUIProject/assets/DressUp/images/pz_icon_3.png


BIN
FGUIProject/assets/DressUp/images/pz_icon_4.png


BIN
FGUIProject/assets/DressUp/images/pz_jtkuang.png


BIN
FGUIProject/assets/DressUp/images/pz_xzanniu.png


BIN
FGUIProject/assets/DressUp/images/pz_xzkuang.png


BIN
FGUIProject/assets/DressUp/images/pz_xzzi_1.png


BIN
FGUIProject/assets/DressUp/images/pz_xzzi_2.png


BIN
FGUIProject/assets/DressUp/images/pz_xzzi_3.png


BIN
FGUIProject/assets/DressUp/images/pz_xzzi_4.png


BIN
FGUIProject/assets/DressUp/images/pz_xzzi_5.png


BIN
FGUIProject/assets/DressUp/images/pz_xzzikuang.png


+ 22 - 1
FGUIProject/assets/DressUp/package.xml

@@ -136,7 +136,6 @@
     <image id="7dea4b" name="kp_dikuang_6.png" path="/images/" scale="9grid" scale9grid="43,41,33,37"/>
     <component id="7dea4c" name="Button7.xml" path="/components/"/>
     <image id="7dea4d" name="dj_danxiaozj.png" path="/images/" atlas="alone_npot"/>
-    <component id="7dea4e" name="ListItem.xml" path="/components/"/>
     <component id="7dea4f" name="ComSelect.xml" path="/components/"/>
     <image id="7dea4g" name="kp_kprk_4.png" path="/images/" scale="9grid" scale9grid="52,90,104,180"/>
     <component id="g3xa4h" name="Button8.xml" path="/components/"/>
@@ -144,6 +143,28 @@
     <component id="g3xa4j" name="Button10.xml" path="/components/"/>
     <component id="g3xa4k" name="Button11.xml" path="/components/"/>
     <component id="g3xa4l" name="ComChecked.xml" path="/"/>
+    <image id="xmtl4m" name="pz_bjanniu_1.png" path="/images/"/>
+    <image id="xmtl4n" name="pz_xzzi_3.png" path="/images/"/>
+    <image id="xmtl4o" name="pz_xzzi_2.png" path="/images/"/>
+    <image id="xmtl4p" name="pz_xzzi_1.png" path="/images/"/>
+    <image id="xmtl4q" name="pz_xzzikuang.png" path="/images/"/>
+    <image id="xmtl4r" name="pz_xzkuang.png" path="/images/"/>
+    <image id="xmtl4s" name="pz_xzanniu.png" path="/images/"/>
+    <image id="xmtl4t" name="pz_jtkuang.png" path="/images/"/>
+    <image id="xmtl4u" name="pz_icon_4.png" path="/images/"/>
+    <image id="xmtl4v" name="pz_icon_3.png" path="/images/"/>
+    <image id="xmtl4w" name="pz_icon_2.png" path="/images/"/>
+    <image id="xmtl4x" name="pz_icon_1.png" path="/images/"/>
+    <image id="xmtl4y" name="pz_dktu_2.png" path="/images/"/>
+    <image id="xmtl4z" name="pz_dktu_1.png" path="/images/"/>
+    <image id="xmtl50" name="pz_dituhua.png" path="/images/"/>
+    <image id="xmtl51" name="pz_bjkuang.png" path="/images/" scale="9grid" scale9grid="7,6,6,7"/>
+    <image id="xmtl52" name="pz_bjanniu_3.png" path="/images/"/>
+    <image id="xmtl53" name="pz_bjanniu_2.png" path="/images/"/>
+    <image id="xmtl54" name="pz_xzzi_4.png" path="/images/"/>
+    <image id="xmtl55" name="pz_xzzi_5.png" path="/images/"/>
+    <component id="xmtl56" name="Component2.xml" path="/components/"/>
+    <component id="xmtl57" name="ListItem.xml" path="/components/"/>
   </resources>
   <publish name="" path="..\GameClient\Assets\ResIn\UI\DressUp" packageCount="2" genCode="true" extractAlpha="true"/>
 </packageDescription>

+ 4 - 5
GameClient/Assets/Game/HotUpdate/DressUp/SceneController.cs

@@ -219,13 +219,12 @@ namespace GFGGame
         {
             var parentGameObj = new GameObject(string.Format("{0}_{1}", itemId, index));
             parentGameObj.transform.SetParent(sceneObj.transform.Find("Scene"), false);
-            // SceneController.UpdateRole(itemId, _sceneObject, false, null, false, gameObj);
+
             DressUpUtil.AddItem(itemId, sceneObj, false, false, parentGameObj);
             for (int i = 0; i < parentGameObj.transform.childCount; i++)
             {
                 GameObject childGameObj = parentGameObj.transform.GetChild(i).gameObject;
                 SceneController.PhotographAddCollider(childGameObj);
-                // GetGameObjectSize(childGameObj, parentGameObj);
             }
         }
         //传入父物体,根据所有子物体大小计算父物体边框大小
@@ -237,16 +236,16 @@ namespace GFGGame
                 GameObject childGameObj = parentObj.transform.GetChild(i).gameObject;
                 Vector2 childSize = childGameObj.GetComponent<SpriteRenderer>().bounds.size;
 
-                if (size.x < childSize.x)
+                if (size.x <= childSize.x)
                 {
                     size.x = childSize.x;
                 }
-                if (size.y < childSize.y)
+                if (size.y <= childSize.y)
                 {
                     size.y = childSize.y;
                 }
             }
-            return size * 100;
+            return size / parentObj.transform.localScale * 100;
         }
         //设置物体中心点
         public static void SetGameObjectCenter(GameObject parentObj)

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/DressUp/UI_ComChecked.cs

@@ -7,6 +7,7 @@ namespace UI.DressUp
     public partial class UI_ComChecked
     {
         public GComponent target;
+        public GImage m_imgBox;
         public GButton m_btnDelete;
         public GButton m_btnFlip;
         public GButton m_btnSize;
@@ -57,12 +58,14 @@ namespace UI.DressUp
 
         private void Init(GComponent comp)
         {
+            m_imgBox = (GImage)comp.GetChild("imgBox");
             m_btnDelete = (GButton)comp.GetChild("btnDelete");
             m_btnFlip = (GButton)comp.GetChild("btnFlip");
             m_btnSize = (GButton)comp.GetChild("btnSize");
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_imgBox = null;
             m_btnDelete = null;
             m_btnFlip = null;
             m_btnSize = null;

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

@@ -9,6 +9,7 @@ namespace UI.DressUp
         public GComponent target;
         public Controller m_c1;
         public GList m_list;
+        public UI_Component2 m_comBtnTab;
         public const string URL = "ui://mbo439wb7dea4f";
         public const string PACKAGE_NAME = "DressUp";
         public const string RES_NAME = "ComSelect";
@@ -58,11 +59,14 @@ namespace UI.DressUp
         {
             m_c1 = comp.GetController("c1");
             m_list = (GList)comp.GetChild("list");
+            m_comBtnTab = (UI_Component2)UI_Component2.Create(comp.GetChild("comBtnTab"));
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_c1 = null;
             m_list = null;
+            m_comBtnTab.Dispose();
+            m_comBtnTab = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 71 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/DressUp/UI_Component2.cs

@@ -0,0 +1,71 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.DressUp
+{
+    public partial class UI_Component2
+    {
+        public GComponent target;
+        public Controller m_c1;
+        public const string URL = "ui://mbo439wbxmtl56";
+        public const string PACKAGE_NAME = "DressUp";
+        public const string RES_NAME = "Component2";
+        private static UI_Component2 _proxy;
+
+        public static UI_Component2 Create(GObject gObject = null)
+        {
+            var ui = new UI_Component2();
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static UI_Component2 Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_Component2();
+            }
+            var ui = _proxy;
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static void ProxyEnd()
+        {
+            if (_proxy != null)
+            {
+                _proxy.Dispose();
+            }
+        }
+
+        public static void ClearProxy()
+        {
+            ProxyEnd();
+            _proxy = null;
+        }
+
+        private void Init(GComponent comp)
+        {
+            m_c1 = comp.GetController("c1");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_c1 = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/DressUp/UI_Component2.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6e420288011b20b4c8fa03ed6e3e9eb7
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 9 - 6
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/DressUp/UI_ListItem.cs

@@ -6,9 +6,10 @@ namespace UI.DressUp
 {
     public partial class UI_ListItem
     {
-        public GComponent target;
+        public GButton target;
         public GLoader m_loaIcon;
-        public const string URL = "ui://mbo439wb7dea4e";
+        public GTextField m_txtName;
+        public const string URL = "ui://mbo439wbxmtl57";
         public const string PACKAGE_NAME = "DressUp";
         public const string RES_NAME = "ListItem";
         private static UI_ListItem _proxy;
@@ -17,9 +18,9 @@ namespace UI.DressUp
         {
             var ui = new UI_ListItem();
             if(gObject == null)
-            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            	ui.target =  (GButton)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
             else
-            	ui.target =  (GComponent)gObject;
+            	ui.target =  (GButton)gObject;
             ui.Init(ui.target);
             return ui;
         }
@@ -32,9 +33,9 @@ namespace UI.DressUp
             }
             var ui = _proxy;
             if(gObject == null)
-            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            	ui.target =  (GButton)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
             else
-            	ui.target =  (GComponent)gObject;
+            	ui.target =  (GButton)gObject;
             ui.Init(ui.target);
             return ui;
         }
@@ -56,10 +57,12 @@ namespace UI.DressUp
         private void Init(GComponent comp)
         {
             m_loaIcon = (GLoader)comp.GetChild("loaIcon");
+            m_txtName = (GTextField)comp.GetChild("txtName");
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_loaIcon = null;
+            m_txtName = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

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

@@ -8,8 +8,8 @@ namespace UI.DressUp
     {
         public GComponent target;
         public GLoader m_btnBg;
-        public GButton m_btnBack;
         public UI_ComChecked m_comSelectBox;
+        public GButton m_btnBack;
         public GButton m_btnChoose;
         public UI_ComSelect m_ComSelectRes;
         public const string URL = "ui://mbo439wbbe944a";
@@ -60,17 +60,17 @@ namespace UI.DressUp
         private void Init(GComponent comp)
         {
             m_btnBg = (GLoader)comp.GetChild("btnBg");
-            m_btnBack = (GButton)comp.GetChild("btnBack");
             m_comSelectBox = (UI_ComChecked)UI_ComChecked.Create(comp.GetChild("comSelectBox"));
+            m_btnBack = (GButton)comp.GetChild("btnBack");
             m_btnChoose = (GButton)comp.GetChild("btnChoose");
             m_ComSelectRes = (UI_ComSelect)UI_ComSelect.Create(comp.GetChild("ComSelectRes"));
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_btnBg = null;
-            m_btnBack = null;
             m_comSelectBox.Dispose();
             m_comSelectBox = null;
+            m_btnBack = null;
             m_btnChoose = null;
             m_ComSelectRes.Dispose();
             m_ComSelectRes = null;

+ 84 - 24
GameClient/Assets/Game/HotUpdate/Views/DressUp/PhotographView.cs

@@ -33,7 +33,13 @@ namespace GFGGame
 
         // private GameObject hitGameObj;//当前选中的物体
         private GameObject hitParentGameObj;//当前选中的父物体(需要进行移动缩放旋转的物体)
+        private GameObject memoryHitParentGameObj;//当前选中的父物体(需要进行移动缩放旋转的物体)
+
         private Vector3 distance = Vector3.zero;//点击位置和点击物体原点的距离,用于
+        private Vector2 lastPos = Vector2.zero;//上一次移动后从物体中心到鼠标位置的方向
+
+        private float _startDistance;//从物体中心到缩放按钮的距离
+
 
         private SwipeGesture swipeGesture;
         private PinchGesture pinchGesture;
@@ -52,7 +58,7 @@ namespace GFGGame
 
             _ui.m_ComSelectRes.m_list.itemRenderer = RenderListItem;
             _ui.m_ComSelectRes.m_list.onClickItem.Add(OnListItemClick);
-            _ui.m_ComSelectRes.m_c1.onChanged.Add(OnContorllerChanged);
+            _ui.m_ComSelectRes.m_comBtnTab.m_c1.onChanged.Add(OnContorllerChanged);
 
             _scenePrefab = GFGAsset.Load<GameObject>(ResPathUtil.GetPrefabPath("ScenePhotograph"));
 
@@ -60,7 +66,9 @@ namespace GFGGame
             _ui.target.onTouchMove.Add(OnClickUIMove);
             _ui.target.onTouchEnd.Add(OnClickUIEnd);
 
-
+            _ui.m_comSelectBox.m_btnSize.onTouchBegin.Add(OnClickBtnSizeBegin);
+            _ui.m_comSelectBox.m_btnSize.onTouchMove.Add(OnClickBtnSizeMove);
+            _ui.m_comSelectBox.m_btnSize.onTouchEnd.Add(OnClickBtnSizeEnd);
         }
 
         protected override void OnShown()
@@ -85,7 +93,7 @@ namespace GFGGame
             rotationGesture = new RotationGesture(_ui.target);
             rotationGesture.onAction.Add(OnRotate);
 
-            _ui.m_ComSelectRes.m_c1.selectedIndex = 0;
+            _ui.m_ComSelectRes.m_comBtnTab.m_c1.selectedIndex = 0;
             OnClickBtnChoose();
             RefreshList(EnumPhotographType.BG);
             UpdateEquipData();
@@ -99,7 +107,7 @@ namespace GFGGame
         /************************************************************UI界面*********************************************************/
         private void OnContorllerChanged(EventContext context)
         {
-            int index = _ui.m_ComSelectRes.m_c1.selectedIndex;
+            int index = _ui.m_ComSelectRes.m_comBtnTab.m_c1.selectedIndex;
             RefreshList((EnumPhotographType)index);
         }
         private void RefreshList(EnumPhotographType index)
@@ -129,16 +137,17 @@ namespace GFGGame
         private void RenderListItem(int index, GObject obj)
         {
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_listData[index]);
-            string resPath = ResPathUtil.GetPhotographFPath(itemCfg.res, ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType));
+            string resPath = ResPathUtil.GetIconPath(itemCfg);
 
             UI_ListItem item = UI_ListItem.Proxy(obj);
             item.target.data = _listData[index];
             item.m_loaIcon.url = resPath;
+            item.m_txtName.text = itemCfg.name;
         }
         private void OnListItemClick(EventContext context)
         {
             int itemID = (int)((context.data as GObject).data);
-            EnumPhotographType type = (EnumPhotographType)_ui.m_ComSelectRes.m_c1.selectedIndex;
+            EnumPhotographType type = (EnumPhotographType)_ui.m_ComSelectRes.m_comBtnTab.m_c1.selectedIndex;
             switch (type)
             {
                 case EnumPhotographType.BG:
@@ -161,7 +170,7 @@ namespace GFGGame
                     break;
             }
         }
-        /************************************************************场景*********************************************************/
+        /**************************  **********************************场景*********************************************************/
 
         private void OnClickUIBegin(EventContext context)
         {
@@ -175,11 +184,18 @@ namespace GFGGame
 
                 hitParentGameObj = hit.collider.name == "BgRes" ? hit.collider.gameObject : hit.collider.transform.parent.gameObject;
                 distance = Input.mousePosition - Camera.main.WorldToScreenPoint(hitParentGameObj.transform.position);
-                Debug.Log("ClickName:" + hitParentGameObj.name);
 
                 _ui.m_comSelectBox.target.visible = hitParentGameObj.transform.parent.gameObject == bgParent ? false : true;
-                _ui.m_comSelectBox.target.size = SceneController.GetGameObjectSize(hitParentGameObj);
+                if (_ui.m_comSelectBox.target.data == null || _ui.m_comSelectBox.target.data as GameObject != hitParentGameObj)
+                {
+                    lastPos = Vector2.zero;
+                    // _ui.m_comSelectBox.target.SetScale(1, 1);
+                    _ui.m_comSelectBox.target.rotation = hitParentGameObj.transform.rotation.z;
+                    _ui.m_comSelectBox.target.size = SceneController.GetGameObjectSize(hitParentGameObj);
+                    _ui.m_comSelectBox.target.SetScale(hitParentGameObj.transform.localScale.x, hitParentGameObj.transform.localScale.y);
+                }
 
+                _ui.m_comSelectBox.target.data = hitParentGameObj;
 
                 ControllerSelectBoxPos(hitParentGameObj);
 
@@ -229,38 +245,77 @@ namespace GFGGame
                 }
             }
         }
+
         //选中框的位置
         private void ControllerSelectBoxPos(GameObject hitParentGameObj)
         {
             SceneController.SetGameObjectCenter(hitParentGameObj);
-            Debug.Log("物体世界坐标:" + hitParentGameObj.transform.position);
+
             //位置:角色、道具、npc全用对应父物体的位置
             Vector2 objScreenPos = Camera.main.WorldToScreenPoint(hitParentGameObj.transform.position);
-            this.viewCom.GlobalToLocal(objScreenPos);
-
-            Debug.Log("物体屏幕坐标:" + hitParentGameObj.transform.position);
-            Debug.Log("屏幕高:" + Screen.height);
-            // Vector2 localPos = new Vector2(objScreenPos.x, (Screen.height - objScreenPos.y));
             Vector2 localPos = this.viewCom.GlobalToLocal(new Vector2(objScreenPos.x, (Screen.height - objScreenPos.y)));
 
-            Debug.Log("localPos:" + localPos);
-            Debug.Log("选框坐标:" + _ui.m_comSelectBox.target.position);
-
             _ui.m_comSelectBox.target.position = localPos;//(localPos.x, localPos.y);
-            Debug.Log("选框坐标:" + _ui.m_comSelectBox.target.position);
 
         }
 
+
+
+        private void OnClickBtnSizeBegin(EventContext context)
+        {
+
+            Vector2 size = _ui.m_comSelectBox.m_imgBox.size;
+            _startDistance = Mathf.Sqrt(size.x * size.x + size.y * size.y) / 2;// Vector2.Distance(pt1, pt2);
+            Debug.Log("_startDistance:" + _startDistance);
+        }
+        private void OnClickBtnSizeMove(EventContext context)
+        {
+            GameObject gameObject = _ui.m_comSelectBox.target.data as GameObject;
+            if (gameObject == null) return;
+            InputEvent inputEvent = (InputEvent)context.data;
+            Vector2 pt1 = this.viewCom.GlobalToLocal(new Vector2(inputEvent.x, inputEvent.y));
+            Vector2 pt2 = this.viewCom.GlobalToLocal(_ui.m_comSelectBox.target.position);
+            Vector2 curPos = pt1 - pt2;
+            float angle = Vector3.Angle(lastPos, curPos); //求出两向量之间的夹角 
+            Vector3 normal = Vector3.Cross(lastPos, curPos);//叉乘求出法线向量 
+            angle *= Mathf.Sign(Vector3.Dot(normal, Vector3.forward));  //Mathf.Sign()求符号,Vector3.Dot()求方向,求法线向量与物体上方向向量点乘,结果为1或-1,修正旋转方向 
+            lastPos = curPos;
+            ControllerRotate(angle, gameObject);
+            Debug.Log("angle:" + angle);
+
+            // Vector2 pt1 = this.viewCom.GlobalToLocal(new Vector2(inputEvent.x, inputEvent.y));
+            // Vector2 pt2 = this.viewCom.GlobalToLocal(_ui.m_comSelectBox.target.position);
+            float dist = Vector2.Distance(pt1, pt2);
+            float ss = dist / _startDistance;
+            float newValue = Mathf.Clamp(ss, 0.1f, 2);
+            ControllerScale(newValue, gameObject);
+
+        }
+        private void OnClickBtnSizeEnd(EventContext context)
+        {
+
+        }
+
+
+
+        //双指缩放
         private void OnPinch(EventContext context)
         {
             if (hitParentGameObj == null) return;
+
             GTween.Kill(hitParentGameObj);
 
             PinchGesture gesture = (PinchGesture)context.sender;
             float newValue = Mathf.Clamp(hitParentGameObj.transform.localScale.x + gesture.delta, 0.3f, 2);
-            if (newValue > MaxScale || newValue < MinScale) return;
-            hitParentGameObj.transform.localScale = new Vector3(newValue, newValue, newValue);
-            _ui.m_comSelectBox.target.SetScale(newValue, newValue);
+
+            ControllerScale(newValue, hitParentGameObj);
+        }
+
+        private void ControllerScale(float value, GameObject gameObject)
+        {
+            if (value > MaxScale || value < MinScale) return;
+            gameObject.transform.localScale = new Vector3(value, value, value);
+            _ui.m_comSelectBox.target.SetScale(value, value);
         }
 
         private void OnRotate(EventContext context)
@@ -269,8 +324,12 @@ namespace GFGGame
             GTween.Kill(hitParentGameObj.transform);
 
             RotationGesture gesture = (RotationGesture)context.sender;
-            hitParentGameObj.transform.Rotate(Vector3.forward, -gesture.delta, Space.World);
-            _ui.m_comSelectBox.target.rotation += -gesture.delta;
+            ControllerRotate(gesture.delta, hitParentGameObj);
+        }
+        private void ControllerRotate(float value, GameObject gameObject)
+        {
+            gameObject.transform.Rotate(Vector3.forward, -value, Space.World);
+            _ui.m_comSelectBox.target.rotation += value;
         }
         //背景
         private void UpdateBgOrNpcOrBorder(EnumPhotographType type, int itemId)
@@ -337,6 +396,7 @@ namespace GFGGame
             }
 
         }
+
         private void OnClickBtnBg()
         {
             _ui.m_ComSelectRes.target.visible = false;

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


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


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