zhaoyang 3 жил өмнө
parent
commit
cf2e529e61

+ 9 - 7
FGUIProject/assets/Card/CardFosterUI.xml

@@ -1,20 +1,24 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1080,1920" overflow="hidden" scroll="horizontal">
+  <controller name="c1" pages="0,,1," selected="0"/>
   <displayList>
     <loader id="n80_gbqo" name="loaBg" xy="540,960" pivot="0.5,0.5" anchor="true" size="1080,2400" fill="scaleMatchWidth">
       <relation target="" sidePair="width-width,height-height,center-center,middle-middle"/>
     </loader>
-    <loader id="n75_sxk4" name="loaCard" xy="-180,0" pivot="0.5,0" size="1440,1920" url="ui://7l6lvkaysxk49j" fill="scaleMatchHeight" clearOnPublish="true">
-      <relation target="" sidePair="height-height"/>
-    </loader>
     <component id="n77_qgxy" name="comImgCard" src="qgxy9r" fileName="ComImgCard.xml" xy="540,0" pivot="0.5,0" anchor="true">
+      <gearDisplay controller="c1" pages="0"/>
       <relation target="" sidePair="width-width,height-height"/>
     </component>
     <component id="n73_sxk4" name="comCard" src="sxk49h" fileName="components/ComCardObj.xml" xy="540,0" pivot="0.5,0" anchor="true" size="1080,1920">
+      <gearDisplay controller="c1" pages="1"/>
       <relation target="" sidePair="width-width,height-height"/>
     </component>
-    <loader id="n78_qgxy" name="loaListener" xy="0,0" size="1080,1920"/>
-    <loader id="n76_sxk4" name="loaListener1" xy="0,0" size="1080,1920"/>
+    <loader id="n78_qgxy" name="loaListener" xy="0,0" size="1080,1920">
+      <gearDisplay controller="c1" pages="1"/>
+    </loader>
+    <loader id="n76_sxk4" name="loaListener1" xy="0,0" size="1080,1920">
+      <gearDisplay controller="c1" pages="0"/>
+    </loader>
     <component id="n71_lc71" name="ComFosterTop" src="j4c69e" fileName="components/ComFosterTop.xml" xy="0,0"/>
     <component id="n70_lc71" name="ComFosterBottom" src="j4c69d" fileName="components/ComFosterBottom.xml" xy="0,211">
       <relation target="" sidePair="bottom-bottom"/>
@@ -22,13 +26,11 @@
   </displayList>
   <transition name="t0">
     <item time="0" type="Scale" target="n73_sxk4" label="normal" tween="true" startValue="0.8,0.8" endValue="1,1" duration="5" label2="scale" ease="Linear"/>
-    <item time="0" type="Scale" target="n75_sxk4" tween="true" startValue="0.8,0.8" endValue="1,1" duration="5" ease="Linear"/>
     <item time="0" type="XY" target="n70_lc71" tween="true" startValue="0,211" endValue="0,1920" duration="12" ease="Linear"/>
     <item time="0" type="XY" target="n71_lc71" tween="true" startValue="0,0" endValue="0,-266" duration="12" ease="Linear"/>
   </transition>
   <transition name="t1">
     <item time="0" type="Scale" target="n73_sxk4" label="scale" tween="true" startValue="1,1" endValue="0.8,0.8" duration="6" label2="normal" ease="Linear"/>
-    <item time="0" type="Scale" target="n75_sxk4" tween="true" startValue="1,1" endValue="0.8,0.8" duration="6" ease="Linear"/>
     <item time="0" type="XY" target="n70_lc71" tween="true" startValue="0,1920" endValue="0,211" duration="3" ease="Linear"/>
     <item time="0" type="XY" target="n71_lc71" tween="true" startValue="0,-311" endValue="0,0" duration="3" ease="Linear"/>
   </transition>

+ 3 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Card/UI_CardFosterUI.cs

@@ -7,8 +7,8 @@ namespace UI.Card
     public partial class UI_CardFosterUI
     {
         public GComponent target;
+        public Controller m_c1;
         public GLoader m_loaBg;
-        public GLoader m_loaCard;
         public UI_ComImgCard m_comImgCard;
         public UI_ComCardObj m_comCard;
         public GLoader m_loaListener;
@@ -64,8 +64,8 @@ namespace UI.Card
 
         private void Init(GComponent comp)
         {
+            m_c1 = comp.GetController("c1");
             m_loaBg = (GLoader)comp.GetChild("loaBg");
-            m_loaCard = (GLoader)comp.GetChild("loaCard");
             m_comImgCard = (UI_ComImgCard)UI_ComImgCard.Create(comp.GetChild("comImgCard"));
             m_comCard = (UI_ComCardObj)UI_ComCardObj.Create(comp.GetChild("comCard"));
             m_loaListener = (GLoader)comp.GetChild("loaListener");
@@ -77,8 +77,8 @@ namespace UI.Card
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_c1 = null;
             m_loaBg = null;
-            m_loaCard = null;
             m_comImgCard.Dispose();
             m_comImgCard = null;
             m_comCard.Dispose();

+ 10 - 15
GameClient/Assets/Game/HotUpdate/Views/Card/CardFosterView.cs

@@ -184,35 +184,30 @@ namespace GFGGame
 
             if (_cardObj != null)
             {
-                _ui.m_loaListener.visible = true;
-                _ui.m_loaListener1.visible = false;
-                _ui.m_comCard.target.visible = true;
-                _ui.m_loaCard.visible = false;
-
+                // _ui.m_loaListener.visible = true;
+                // _ui.m_loaListener1.visible = false;
+                // _ui.m_comCard.target.visible = true;
+                // _ui.m_loaCard.visible = false;
+                _ui.m_c1.selectedIndex = 1;
                 _ui.m_comCard.target.scrollPane.SetPercX(0.5f, false);
                 _ui.m_comCard.target.SetScale(_cardScale, _cardScale);
             }
             else
             {
-                _ui.m_comCard.target.visible = false;
-                _ui.m_loaCard.visible = false;
-                _ui.m_loaListener.visible = false;
-                _ui.m_loaListener1.visible = true;
+                // _ui.m_comCard.target.visible = false;
+                // _ui.m_loaListener.visible = false;
+                // _ui.m_loaListener1.visible = true;
+
+                _ui.m_c1.selectedIndex = 0;
                 if (comCardImgResInitSize == Vector2.zero)
                 {
                     _ui.m_comImgCard.m_ComCardImgRes.m_loaCard.url = ResPathUtil.GetCardPath(_cardData.resources[_cardData.resIndex]);
                     GLoader loaCard = _ui.m_comImgCard.m_ComCardImgRes.m_loaCard;
                     float scale = _ui.target.height * 0.8f / loaCard.initHeight;
                     comCardImgResInitSize = new Vector2(loaCard.initWidth * scale, loaCard.initHeight * scale);
-                    // comCardImgResInitSize = new Vector2(_ui.m_comImgCard.m_ComCardImgRes.m_loaCard.initWidth * 0.8f, _ui.m_comImgCard.m_ComCardImgRes.m_loaCard.initHeight * 0.8f);
-                    // _ui.m_comImgCard.target.size = new Vector2(_ui.target.width, _ui.target.height * 0.8f);
                     _ui.m_comImgCard.target.scrollPane.SetPercX(0.5f, false);
                     _ui.m_comImgCard.m_ComCardImgRes.target.size = comCardImgResInitSize;
-
                 }
-
-                //SetSize(_ui.m_comImgCard.m_ComCardImgRes.m_loaCard.initWidth * _cardScale, _ui.m_comImgCard.m_ComCardImgRes.m_loaCard.initHeight * _cardScale);
-
             }
 
         }

BIN
GameClient/Assets/ResIn/UI/Card/Card_fui.bytes