zhaoyang 2 年之前
父節點
當前提交
47d6e27d10

+ 1 - 1
FGUIProject/assets/Bag/components/ListItem.xml

@@ -2,7 +2,7 @@
 <component size="221,222">
   <displayList>
     <image id="n18_si5z" name="n18" src="si5zti4" fileName="images/wpbb_di.png" xy="0,0"/>
-    <loader id="n19_si5z" name="loaIcon" xy="41,42" size="138,138" aspect="true"/>
+    <loader id="n19_si5z" name="loaIcon" xy="41,42" pivot="0.5,0.5" size="138,138" aspect="true" fill="scale"/>
     <text id="n20_si5z" name="txtCount" xy="135,166" pivot="1,0" size="69,49" fontSize="36" color="#fbf6eb" vars="true" strokeColor="#5c4e3f" strokeSize="2" text="x{count=20}"/>
   </displayList>
 </component>

+ 5 - 5
FGUIProject/assets/CommonGame/GoodsItemTips.xml

@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="962,1146">
+<component size="962,1137">
   <displayList>
-    <component id="n21_si5z" name="comBg" src="si5ztih" fileName="components/ComBg.xml" xy="0,0" size="962,1146">
-      <relation target="" sidePair="height-height"/>
+    <component id="n21_si5z" name="comBg" src="si5ztih" fileName="components/ComBg.xml" xy="0,0" size="962,1137">
+      <relation target="n17_ohbx" sidePair="height-height"/>
     </component>
     <component id="n2_s2cc" name="comTipsBase" src="ohbxti3" fileName="components/ComTipsBase.xml" xy="0,15" group="n17_ohbx"/>
-    <component id="n19_ohbx" name="comTipsApproach" src="ohbxti6" fileName="ComTipsApproach.xml" xy="0,525" group="n17_ohbx"/>
-    <group id="n17_ohbx" name="grpTips" xy="0,15" size="962,1126" advanced="true" layout="vt" excludeInvisibles="true"/>
+    <component id="n19_ohbx" name="comTipsApproach" src="ohbxti6" fileName="components/ComTipsApproach.xml" xy="0,505" size="962,596" group="n17_ohbx"/>
+    <group id="n17_ohbx" name="grpTips" xy="0,15" size="962,1086" advanced="true" layout="vt" excludeInvisibles="true"/>
   </displayList>
   <relation target="n17_ohbx" sidePair="height-height"/>
 </component>

+ 8 - 4
FGUIProject/assets/CommonGame/components/ComBg.xml

@@ -1,9 +1,13 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="962,1133" overflow="hidden">
+<component size="962,1137" overflow="hidden">
   <displayList>
-    <image id="n20_si5z" name="n20" src="si5ztid" fileName="imgnew/tc_tydikua_1.png" xy="0,5"/>
-    <image id="n21_si5z" name="n21" src="si5ztie" fileName="imgnew/tc_tydikua_3.png" xy="0,0"/>
-    <image id="n22_si5z" name="n22" src="si5ztif" fileName="imgnew/tc_tydikua_52.png" xy="0,1119">
+    <image id="n20_si5z" name="n20" src="si5ztid" fileName="imgnew/tc_tydikua_1.png" xy="0,2">
+      <relation target="" sidePair="top-top"/>
+    </image>
+    <image id="n21_si5z" name="n21" src="si5ztie" fileName="imgnew/tc_tydikua_3.png" xy="0,0">
+      <relation target="" sidePair="top-top"/>
+    </image>
+    <image id="n22_si5z" name="n22" src="si5ztif" fileName="imgnew/tc_tydikua_52.png" xy="0,1123">
       <relation target="" sidePair="bottom-bottom"/>
     </image>
   </displayList>

+ 1 - 1
FGUIProject/assets/CommonGame/components/ComFunctionOpen.xml

@@ -4,7 +4,7 @@
     <image id="n5_tt1q" name="n5" src="tt1q9w" fileName="images/xjs_ditu_1.png" xy="38,38"/>
     <image id="n6_tt1q" name="n6" src="tt1q9x" fileName="images/xjs_ditu_2.png" xy="29,29"/>
     <image id="n7_tt1q" name="n7" src="tt1q9y" fileName="images/xjs_ditu_3.png" xy="-146,-97"/>
-    <loader id="n2_g3nf" name="logIcon" xy="161,161" size="160,160" autoSize="true"/>
+    <loader id="n2_g3nf" name="logIcon" xy="161,161" size="160,160" fill="scale"/>
     <text id="n4_g3nf" name="txtName" xy="179,327" pivot="0.5,0" size="124,54" fontSize="40" color="#b08b57" align="center" text="新解锁"/>
   </displayList>
 </component>

+ 2 - 2
FGUIProject/assets/CommonGame/components/ComTipsApproach.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="962,616">
+<component size="962,615">
   <displayList>
     <image id="n25_si5z" name="n25" src="si5zti8" fileName="imgnew/tc_zszs.png" xy="68,22" group="n21_ohbx"/>
     <text id="n20_ohbx" name="n20" xy="399,0" size="164,54" group="n21_ohbx" fontSize="40" color="#8a7253" text="获取途径"/>
@@ -10,6 +10,6 @@
       <item/>
       <item/>
     </list>
-    <text id="n24_ohbx" name="txtNone" xy="350,833" size="220,49" fontSize="36" color="#f9e4c2" text="暂无获取途径"/>
+    <text id="n24_ohbx" name="txtNone" xy="354,256" size="254,56" fontSize="42" color="#a49a86" text="暂无获取途径"/>
   </displayList>
 </component>

+ 12 - 12
FGUIProject/assets/CommonGame/components/ComTipsBase.xml

@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="962,510">
+<component size="962,490">
   <displayList>
     <text id="n1_s2cc" name="txtName" xy="65,50" size="186,61" fontSize="46" color="#8a7253" autoClearText="true" text="物品名字"/>
-    <text id="n3_s2cc" name="txtOwned" xy="742,72" pivot="1,0" size="139,42" fontSize="30" color="#90877f" vars="true" text="已拥有:{count=20}"/>
+    <text id="n3_s2cc" name="txtOwned" xy="742,72" pivot="1,0" size="139,41" fontSize="30" color="#90877f" vars="true" text="已拥有:{count=20}"/>
     <image id="n7_si5z" name="n7" src="si5ztig" fileName="imgnew/tc_xiant.png" xy="56,122"/>
     <loader id="n6_ohbx" name="loaRarity" xy="249,156" size="44,94" url="ui://eg2y0ldpd4iw4z" autoSize="true"/>
-    <loader id="n8_si5z" name="loaIcon" xy="165,245" pivot="0.5,0.5" anchor="true" size="200,200" aspect="true" autoSize="true"/>
+    <loader id="n8_si5z" name="loaIcon" xy="187,270" pivot="0.5,0.5" anchor="true" size="200,200" aspect="true" autoSize="true"/>
     <image id="n10_si5z" name="n10" src="si5ztia" fileName="imgnew/tc_kuangk.png" xy="357,159"/>
     <text id="n9_si5z" name="txtDesc" xy="375,181" size="506,166" fontSize="30" color="#998a79" ubb="true" autoSize="none" autoClearText="true" text="手机课程很快就要开课咯!!同学们有没有很期待哇过 几天课上见昂!!28节课希望大家都可以跟下来一起度 过有趣儿的两个月吧。"/>
-    <image id="n11_si5z" name="n11" src="842s6h" fileName="imagesExport/kp_sx_1.png" xy="75,420" size="50,50" group="n19_si5z"/>
-    <image id="n12_si5z" name="n12" src="842s6i" fileName="imagesExport/kp_sx_2.png" xy="300,420" size="50,50" group="n19_si5z"/>
-    <image id="n13_si5z" name="n13" src="842s6j" fileName="imagesExport/kp_sx_3.png" xy="525,420" size="50,50" group="n19_si5z"/>
-    <image id="n14_si5z" name="n14" src="842s6k" fileName="imagesExport/kp_sx_4.png" xy="750,420" size="50,50" group="n19_si5z"/>
-    <text id="n15_si5z" name="txtGong" xy="135,424" size="77,41" group="n19_si5z" fontSize="30" color="#aa865f" autoClearText="true" text="5000"/>
-    <text id="n16_si5z" name="txtShang" xy="360,424" size="77,41" group="n19_si5z" fontSize="30" color="#aa865f" autoClearText="true" text="5000"/>
-    <text id="n17_si5z" name="txtJue" xy="585,424" size="77,41" group="n19_si5z" fontSize="30" color="#aa865f" autoClearText="true" text="5000"/>
-    <text id="n18_si5z" name="txtZhi" xy="810,424" size="77,41" group="n19_si5z" fontSize="30" color="#aa865f" autoClearText="true" text="5000"/>
-    <group id="n19_si5z" name="grpScore" xy="75,420" size="812,50" advanced="true"/>
+    <image id="n11_si5z" name="n11" src="842s6h" fileName="imagesExport/kp_sx_1.png" xy="75,400" size="50,50" group="n19_si5z"/>
+    <image id="n12_si5z" name="n12" src="842s6i" fileName="imagesExport/kp_sx_2.png" xy="300,400" size="50,50" group="n19_si5z"/>
+    <image id="n13_si5z" name="n13" src="842s6j" fileName="imagesExport/kp_sx_3.png" xy="525,400" size="50,50" group="n19_si5z"/>
+    <image id="n14_si5z" name="n14" src="842s6k" fileName="imagesExport/kp_sx_4.png" xy="750,400" size="50,50" group="n19_si5z"/>
+    <text id="n15_si5z" name="txtGong" xy="135,404" size="77,41" group="n19_si5z" fontSize="30" color="#aa865f" autoClearText="true" text="5000"/>
+    <text id="n16_si5z" name="txtShang" xy="360,404" size="77,41" group="n19_si5z" fontSize="30" color="#aa865f" autoClearText="true" text="5000"/>
+    <text id="n17_si5z" name="txtJue" xy="585,404" size="77,41" group="n19_si5z" fontSize="30" color="#aa865f" autoClearText="true" text="5000"/>
+    <text id="n18_si5z" name="txtZhi" xy="810,404" size="77,41" group="n19_si5z" fontSize="30" color="#aa865f" autoClearText="true" text="5000"/>
+    <group id="n19_si5z" name="grpScore" xy="75,400" size="812,50" advanced="true"/>
   </displayList>
 </component>

+ 0 - 0
FGUIProject/assets/CommonGame/imgnew/tc_txbiao_1.png → FGUIProject/assets/CommonGame/imgFunIcon/tc_txbiao_1.png


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

@@ -150,7 +150,6 @@
     <image id="pzq19p" name="cj_hd_xin.png" path="/imagesExport/" exported="true"/>
     <image id="g3nf9q" name="jinbi_1.png" path="/imgItemIcon/"/>
     <component id="g3nf9r" name="FunctionOpenUI.xml" path="/" exported="true"/>
-    <image id="g3nf9t" name="js_icon_.png" path="/imgFunIcon/" exported="true"/>
     <component id="eiwu9v" name="ComFunctionOpen.xml" path="/components/"/>
     <image id="tt1q9w" name="xjs_ditu_1.png" path="/images/"/>
     <image id="tt1q9x" name="xjs_ditu_2.png" path="/images/"/>
@@ -207,7 +206,8 @@
     <image id="si5ztif" name="tc_tydikua_52.png" path="/imgnew/"/>
     <image id="si5ztig" name="tc_xiant.png" path="/imgnew/"/>
     <component id="si5ztih" name="ComBg.xml" path="/components/" exported="true"/>
-    <image id="si5ztii" name="tc_txbiao_1.png" path="/imgnew/"/>
+    <image id="si5ztii" name="tc_txbiao_1.png" path="/imgFunIcon/" exported="true"/>
+    <image id="s5s9tij" name="js_icon_.png" path="/imgFunIcon/"/>
   </resources>
   <publish name="" path="..\GameClient\Assets\ResIn\UI\CommonGame" packageCount="2" genCode="true" extractAlpha="true"/>
 </packageDescription>

+ 3 - 2
GameClient/Assets/Game/HotUpdate/Views/Bag/BagExchangeView.cs

@@ -32,7 +32,8 @@ namespace GFGGame
             packageName = UI_BagExchangeUI.PACKAGE_NAME;
             _ui = UI_BagExchangeUI.Create();
             this.viewCom = _ui.target;
-            isfullScreen = true;
+            this.viewCom.Center();
+            this.modal = true;
 
             _ui.m_btnAdd.target.onClick.Add(OnBtnAddClick);
             _ui.m_btnMinus.target.onClick.Add(OnBtnMinusClick);
@@ -91,7 +92,7 @@ namespace GFGGame
             _ui.m_btnMax.m_c1.selectedIndex = _count == hasCount ? 1 : 0;
             _ui.m_btnMax.target.touchable = _count == hasCount ? false : true;
 
-            _ui.m_txtTips.text = string.Format("是否使用{0}个{1}", _count, itemCfg.name);
+            _ui.m_txtTips.text = string.Format("是否使用{0}个{1}", _count, itemCfg.name);
         }
 
         private void OnBtnAddClick()

+ 26 - 18
GameClient/Assets/Game/HotUpdate/Views/Bag/BagView.cs

@@ -12,7 +12,7 @@ namespace GFGGame
     {
         private UI_BagUI _ui;
         private ValueBarController _valueBarController;
-        private List<ItemView> _listItemViews = new List<ItemView>();
+        // private List<ItemView> _listItemViews = new List<ItemView>();
         private int _curItemId = -1;
         public override void Dispose()
         {
@@ -22,11 +22,11 @@ namespace GFGGame
                 _valueBarController.Dispose();
                 _valueBarController = null;
             }
-            for (int i = 0; i < _listItemViews.Count; i++)
-            {
-                _listItemViews[i].Dispose();
-                _listItemViews[i] = null;
-            }
+            // for (int i = 0; i < _listItemViews.Count; i++)
+            // {
+            //     _listItemViews[i].Dispose();
+            //     _listItemViews[i] = null;
+            // }
 
             if (_ui != null)
             {
@@ -93,28 +93,36 @@ namespace GFGGame
         private void ListItemRender(int index, GObject obj)
         {
             ItemData itemData = BagDataManager.Instance.BagDatas[index];
-            if (obj.data == null)
-            {
-                ItemView itemView = new ItemView(obj as GComponent);
-                obj.data = itemView;
-                _listItemViews.Add(itemView);
-            }
-            (obj.data as ItemView).SetData(itemData);
-            (obj.data as ItemView).ShowName = false;
-            (obj.data as ItemView).ShowHasCount = false;
-            (obj.data as ItemView).ShowTips = false;
+            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemData.id);
+            UI_ListItem item = UI_ListItem.Proxy(obj);
+            item.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg);
+            item.m_txtCount.SetVar("count", itemData.num.ToString()).FlushVars();
+            item.target.data = itemCfg;
+            // if (obj.data == null)
+            // {
+            //     ItemView itemView = new ItemView(obj as GComponent);
+            //     obj.data = itemView;
+            //     _listItemViews.Add(itemView);
+            // }
+            // (obj.data as ItemView).SetData(itemData);
+            // (obj.data as ItemView).ShowName = false;
+            // (obj.data as ItemView).ShowHasCount = false;
+            // (obj.data as ItemView).ShowTips = false;
         }
 
         private void OnListItemClick(EventContext context)
         {
             GComponent comItem = (context.data as GComponent);
-            ItemView itemData = comItem.data as ItemView;
-            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemData.ItemData.id);
+            ItemCfg itemCfg = comItem.data as ItemCfg;
             if (itemCfg.subType == 0)
             {
                 object[] sourceDatas = new object[] { itemCfg.id, new object[] { typeof(BagView).FullName, this.viewData } };
                 GoodsItemTipsController.ShowItemTips(itemCfg.id, sourceDatas);
             }
+            else if (itemCfg.subType == 1)
+            {
+                ViewManager.Show<BagExchangeView>(itemCfg.id);
+            }
         }
 
         private void OnBtnBackClick()

+ 10 - 5
GameClient/Assets/Game/HotUpdate/Views/CommonGame/ApproachView.cs

@@ -41,7 +41,7 @@ namespace GFGGame
             _fromeViewDatas = viewData[1] as object[];
             _needCount = viewData.Length > 2 ? (int)viewData[2] : 0;
             _ui.m_list.itemRenderer = ListApproachItemRenderer;
-            _ui.m_list.onClickItem.Add(OnClickListApproachItem);
+            // _ui.m_list.onClickItem.Add(OnClickListApproachItem);
 
             SetData();
             UpdateView();
@@ -72,7 +72,8 @@ namespace GFGGame
             string[] infos = _approachDatas[index];
             string functionId = infos[0];
             GameFunctionCfg gameFunctionCfg = GameFunctionCfgArray.Instance.GetCfg(functionId);
-
+            FunctionOpenCfg functionOpenCfg = FunctionOpenCfgArray.Instance.GetCfg(gameFunctionCfg.functionId);
+            listItem.m_loaIcon.url = ResPathUtil.GetCommonGameResPath(functionOpenCfg.res);
             if (functionId == ConstFunctionId.JU_QING_GUAN_QIA)
             {
                 var levelCfgId = int.Parse(infos[1]);
@@ -118,13 +119,17 @@ namespace GFGGame
                 listItem.m_txtSourceName.text = gameFunctionCfg.name;
             }
 
-            listItem.target.data = infos;
+            if (listItem.target.data == null)
+            {
+                listItem.m_btnGo.target.onClick.Add(OnClickListApproachItem);
+            }
+            listItem.m_btnGo.target.data = infos;
             UI_ListSourceItem.ProxyEnd();
         }
         private void OnClickListApproachItem(EventContext context)
         {
-            GObject listItem = context.data as GObject;
-            string[] infos = listItem.data as string[];
+            GObject btnGo = context.sender as GObject;
+            string[] infos = btnGo.data as string[];
             string functionId = infos[0];
 
             int hasNum = ItemDataManager.GetItemNum(_itemId);

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Views/CommonGame/GoodsItemTipsView.cs

@@ -6,13 +6,13 @@ namespace GFGGame
     public class GoodsItemTipsView : BaseWindow
     {
         private UI_GoodsItemTips _ui;
-        private ItemView itemView;
+        // private ItemView itemView;
         private ApproachView approachView;
         private ItemCfg itemCfg;
         public override void Dispose()
         {
             base.Dispose();
-            itemView.Dispose();
+            // itemView.Dispose();
             if (approachView != null)
             {
                 approachView.Dispose();

二進制
GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes


二進制
GameClient/Assets/ResIn/UI/Bag/Bag_fui.bytes


二進制
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0!a.png


二進制
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0.png


二進制
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes