浏览代码

卡牌选中

zhaoyang 2 年之前
父节点
当前提交
edfc3e2992

+ 0 - 6
FGUIProject/assets/Main/Component8.xml

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<component size="1080,1700" overflow="scroll">
-  <displayList>
-    <component id="n5_o4m7" name="compChapterScroll" src="o4m7fr7" fileName="componentsLevel/CompChapterScroll.xml" xy="0,0"/>
-  </displayList>
-</component>

+ 17 - 16
FGUIProject/assets/Main/StoryCardChooseUI.xml

@@ -1,24 +1,24 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="1080,1468">
+<component size="1080,1920">
   <displayList>
-    <image id="n7_sx2v" name="n7" src="sx2v9r" fileName="imagesStory/zd_tctcdi_1.png" xy="0,-530" size="1080,2228"/>
-    <image id="n9_wzce" name="n9" src="sx2v9u" fileName="imagesStory/zd_tctcxian_1.png" xy="320,178"/>
-    <loader id="n4_cn27" name="loaScore" xy="658,114" size="58,58" aspect="true" visible="false" url="ui://eg2y0ldp842s6h" fill="scaleMatchWidth">
+    <image id="n7_sx2v" name="n7" src="sx2v9r" fileName="imagesStory/zd_tctcdi_1.png" xy="0,-308" size="1080,2228" group="n22_o4m7"/>
+    <image id="n9_wzce" name="n9" src="sx2v9u" fileName="imagesStory/zd_tctcxian_1.png" xy="320,400" group="n22_o4m7"/>
+    <loader id="n4_cn27" name="loaScore" xy="658,336" size="58,58" group="n22_o4m7" aspect="true" visible="false" url="ui://eg2y0ldp842s6h" fill="scaleMatchWidth">
       <relation target="n5_cn27" sidePair="left-right"/>
     </loader>
-    <text id="n5_cn27" name="txtName" xy="439,107" pivot="0.5,0" size="202,66" font="ui://eg2y0ldpa0cftkz" fontSize="50" color="#9b7853" autoClearText="true" text="技能名字"/>
-    <component id="n13_ofwu" name="btnUpCard" src="rv091e" fileName="components/BtnSmall.xml" pkg="mk0fwx0x" xy="768,245">
+    <text id="n5_cn27" name="txtName" xy="439,329" pivot="0.5,0" size="202,66" group="n22_o4m7" font="ui://eg2y0ldpa0cftkz" fontSize="50" color="#9b7853" autoClearText="true" text="技能名字"/>
+    <component id="n13_ofwu" name="btnUpCard" src="rv091e" fileName="components/BtnSmall.xml" pkg="mk0fwx0x" xy="768,467" group="n22_o4m7">
       <Button title="提升词牌"/>
     </component>
-    <text id="n11_wzce" name="txtTips" xy="719,342" size="267,51" group="n16_ofwu" font="ui://eg2y0ldpa0cftkz" fontSize="38" color="#c67c6b" text="选择适合的词牌"/>
-    <image id="n10_wzce" name="n10" src="sx2v9q" fileName="imagesStory/zd_tctcxian_2.png" xy="680,360" group="n16_ofwu"/>
-    <group id="n16_ofwu" name="n16" xy="680,342" size="306,52"/>
-    <list id="n15_ofwu" name="listSkill" xy="99,207" size="365,113" layout="row" colGap="16" defaultItem="ui://mfvz4q8kofwup0">
+    <text id="n11_wzce" name="txtTips" xy="719,564" size="267,51" group="n16_ofwu" font="ui://eg2y0ldpa0cftkz" fontSize="38" color="#c67c6b" text="选择适合的词牌"/>
+    <image id="n10_wzce" name="n10" src="sx2v9q" fileName="imagesStory/zd_tctcxian_2.png" xy="680,582" group="n16_ofwu"/>
+    <group id="n16_ofwu" name="n16" xy="680,564" size="306,52" group="n22_o4m7"/>
+    <list id="n15_ofwu" name="listSkill" xy="99,429" size="365,113" group="n22_o4m7" layout="row" colGap="16" defaultItem="ui://mfvz4q8kofwup0">
       <item/>
       <item/>
       <item/>
     </list>
-    <list id="n0_r1a9" name="listCard" xy="41,415" size="998,813" layout="flow_hz" overflow="scroll" lineGap="15" colGap="10" defaultItem="ui://mfvz4q8kr1a99f" autoClearItems="true">
+    <list id="n0_r1a9" name="listCard" xy="41,637" size="998,813" group="n22_o4m7" layout="flow_hz" overflow="scroll" lineGap="15" colGap="10" defaultItem="ui://mfvz4q8kr1a99f" autoClearItems="true">
       <item/>
       <item/>
       <item/>
@@ -37,14 +37,15 @@
       <item/>
       <item/>
     </list>
-    <component id="n17_ofwu" name="comSkillTips" src="ofwup2" fileName="components/ComArenaSkillTips.xml" xy="99,316" visible="false"/>
-    <image id="n18_ebfi" name="n18" src="ebfipr" fileName="imagesStory/zd_tctcdi_1_zz.png" xy="51,1119"/>
-    <component id="n2_r1a9" name="btnCancel" src="ih7595" fileName="components/Button11.xml" pkg="mk0fwx0x" xy="129,1294" group="n12_ofwu">
+    <component id="n17_ofwu" name="comSkillTips" src="ofwup2" fileName="components/ComArenaSkillTips.xml" xy="99,538" group="n22_o4m7" visible="false"/>
+    <image id="n18_ebfi" name="n18" src="ebfipr" fileName="imagesStory/zd_tctcdi_1_zz.png" xy="51,1341" group="n22_o4m7"/>
+    <component id="n2_r1a9" name="btnCancel" src="ih7595" fileName="components/Button11.xml" pkg="mk0fwx0x" xy="129,1516" group="n12_ofwu">
       <Button title="取消"/>
     </component>
-    <component id="n3_r1a9" name="btnConfirm" src="ih7594" fileName="components/Button10.xml" pkg="mk0fwx0x" xy="571,1294" group="n12_ofwu">
+    <component id="n3_r1a9" name="btnConfirm" src="ih7594" fileName="components/Button10.xml" pkg="mk0fwx0x" xy="571,1516" group="n12_ofwu">
       <Button title="确认"/>
     </component>
-    <group id="n12_ofwu" name="n12" xy="129,1294" size="822,105"/>
+    <group id="n12_ofwu" name="n12" xy="129,1516" size="822,105" group="n22_o4m7"/>
+    <group id="n22_o4m7" name="n22" xy="0,-308" size="1080,2228"/>
   </displayList>
 </component>

+ 7 - 0
FGUIProject/assets/Main/components/ComCardSelect.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="242,492" mask="n28_o4m7">
+  <displayList>
+    <graph id="n26_o4m7" name="holder" xy="122,218" size="10,10" touchable="false"/>
+    <graph id="n28_o4m7" name="n28" xy="4,10" size="234,432" type="rect" lineSize="0"/>
+  </displayList>
+</component>

+ 2 - 2
FGUIProject/assets/Main/package.xml

@@ -193,7 +193,7 @@
     <component id="py009o" name="ComSkillCard.xml" path="/components/"/>
     <component id="sx2v9p" name="ComSkillName.xml" path="/components/"/>
     <image id="sx2v9q" name="zd_tctcxian_2.png" path="/imagesStory/"/>
-    <image id="sx2v9r" name="zd_tctcdi_1.png" path="/imagesStory/" scale="9grid" scale9grid="270,0,540,66"/>
+    <image id="sx2v9r" name="zd_tctcdi_1.png" path="/imagesStory/" scale="9grid" scale9grid="270,0,540,138"/>
     <image id="sx2v9s" name="zd_tctcdikugn_1.png" path="/imagesStory/"/>
     <image id="sx2v9t" name="zd_tctcdikugn_2.png" path="/imagesStory/" scale="9grid" scale9grid="54,58,108,116"/>
     <image id="sx2v9u" name="zd_tctcxian_1.png" path="/imagesStory/"/>
@@ -685,7 +685,6 @@
     <image id="o4m7frd" name="zxgq_zddb.png" path="/imagesNew/"/>
     <image id="o4m7fre" name="zxgq_zdtb.png" path="/imagesNew/"/>
     <image id="o4m7frf" name="zxian_bg3_cover.png" path="/imagesNew/"/>
-    <component id="o4m7frg" name="Component8.xml" path="/"/>
     <image id="o4m7frl" name="zjm_tb_fuben.png" path="/images/"/>
     <image id="o4m7frm" name="sn_img_verzz.png" path="/imagesNew/"/>
     <image id="o4m7frn" name="sn_img_circle_zz.png" path="/imagesNew/"/>
@@ -722,6 +721,7 @@
     <image id="o4m7fsm" name="zxian_chapter_7.png" path="/imagesExport/" exported="true"/>
     <image id="o4m7fsn" name="zxian_chapter_8.png" path="/imagesExport/" exported="true"/>
     <image id="o4m7fso" name="zxian_chapter_lock_bg_l.png" path="/imagesNew/"/>
+    <component id="o4m7fsp" name="ComCardSelect.xml" path="/components/" exported="true"/>
   </resources>
   <publish name="" path="../GameClient/Assets/ResIn/UI/Main" packageCount="2" genCode="true" extractAlpha="true"/>
 </packageDescription>

+ 71 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_ComCardSelect.cs

@@ -0,0 +1,71 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.Main
+{
+    public partial class UI_ComCardSelect
+    {
+        public GComponent target;
+        public GGraph m_holder;
+        public const string URL = "ui://mfvz4q8ko4m7fsp";
+        public const string PACKAGE_NAME = "Main";
+        public const string RES_NAME = "ComCardSelect";
+        private static UI_ComCardSelect _proxy;
+
+        public static UI_ComCardSelect Create(GObject gObject = null)
+        {
+            var ui = new UI_ComCardSelect();
+            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_ComCardSelect Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_ComCardSelect();
+            }
+            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_holder = (GGraph)comp.GetChild("holder");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_holder = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_ComCardSelect.cs.meta

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

+ 16 - 2
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryCardChoose.cs

@@ -19,9 +19,17 @@ namespace GFGGame
 
         private List<GameObject> _effects = new List<GameObject>();
         private List<GoWrapper> _wrappers = new List<GoWrapper>();
+        private GameObject gameObject0;
+        private GoWrapper wrapper0;
+        private GComponent _comSelected;
         public override void Dispose()
         {
             base.Dispose();
+            if (_comSelected != null)
+            {
+                _comSelected.RemoveFromParent();
+                _comSelected.Dispose();
+            }
             for (int i = 0; i < _effects.Count; i++)
             {
                 SceneController.DestroyObjectFromView(_effects[i], _wrappers[i]);
@@ -53,6 +61,11 @@ namespace GFGGame
             _ui.m_btnCancel.onClick.Add(OnBtnCancelClick);
             _ui.m_btnConfirm.onClick.Add(OnBtnComfirmClick);
             _ui.m_btnUpCard.onClick.Add(OnBtnUpCardClikc);
+
+            _comSelected = UIPackage.CreateObject(UI_MainUI.PACKAGE_NAME, "ComCardSelect").asCom;
+            string resPath = ResPathUtil.GetViewEffectPath("ui_fight_new", "kp_Select");
+
+            // SceneController.AddObjectToView(gameObject0, null, _comSelected.GetChild("holder").asGraph, resPath, out gameObject0, out wrapper0);
         }
         protected override void OnShown()
         {
@@ -91,6 +104,7 @@ namespace GFGGame
             _ui.m_listSkill.numItems = skillCfgs.Count;
             _ui.m_comSkillTips.target.visible = false;
             _selectedIndex = index;
+            _ui.m_listCard.GetChildAt(index).asCom.AddChild(_comSelected);
         }
         private void RenderListSkillItem(int index, GObject obj)
         {
@@ -143,10 +157,10 @@ namespace GFGGame
             // comStar.m_c1.selectedIndex = cardData.star;
             if (_effects.Count <= index)
             {
-                string resPath = ResPathUtil.GetViewEffectPath("ui_xz", "ui_xz_zd_kq");
+                string resPath = ResPathUtil.GetViewEffectPath("ui_fight_new", "kp_Select");
                 GameObject gameObject0;
                 GoWrapper wrapper0;
-                // SceneController.AddObjectToView(null, null, item.m_holder, resPath, out gameObject0, out wrapper0);
+                // SceneController.AddObjectToView(null, null, item.m_comEff.m_holder, resPath, out gameObject0, out wrapper0);
                 // _effects.Add(gameObject0);
                 // _wrappers.Add(wrapper0);
             }

二进制
GameClient/Assets/ResIn/UI/Main/Main_fui.bytes