zhaoyang 2 лет назад
Родитель
Сommit
58ab03e190

+ 6 - 9
FGUIProject/assets/FieldGuide/TravelShowUI.xml

@@ -5,14 +5,11 @@
       <relation target="" sidePair="width-width,height-height,center-center,middle-middle"/>
     </loader>
     <component id="n9_pjip" name="btnBack" src="9xlo8" fileName="components/ButtonBack1.xml" pkg="eg2y0ldp" xy="35,80"/>
-    <loader id="n17_s61p" name="loaItem" xy="540,960" pivot="0.5,0.5" anchor="true" size="740,1210" url="ui://vqq9h9h4s61p2c" autoSize="true">
-      <relation target="" sidePair="center-center,middle-middle"/>
-    </loader>
-    <text id="n18_s61p" name="txtTitle" xy="71,1550" size="292,64" fontSize="48" color="#816b4d" text="白金黑松露精">
-      <relation target="" sidePair="left-left,top-bottom"/>
-    </text>
-    <text id="n19_s61p" name="txtDesc" xy="80,1648" size="932,142" fontSize="36" color="#907656" autoSize="none" text="那些打不倒你的,/终将积聚成你内在的能量。当能量足够强 大,何必再借光,你就是光!与我一起开启@雅诗兰黛 全新 #白金黑松露精华# 的强大内核能量">
-      <relation target="" sidePair="left-left,top-bottom"/>
-    </text>
+    <list id="n20_wono" name="list" xy="89,243" size="902,1434" overflow="scroll" defaultItem="ui://vqq9h9h4wono2m">
+      <item/>
+      <item/>
+      <item/>
+    </list>
+    <component id="n21_wono" name="btnReward" src="wono2n" fileName="components/Button5.xml" xy="915,83"/>
   </displayList>
 </component>

+ 15 - 0
FGUIProject/assets/FieldGuide/components/Button5.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="99,98" extention="Button">
+  <controller name="button" pages="0,up,1,down" selected="0"/>
+  <controller name="c1" pages="0,,1," selected="1"/>
+  <displayList>
+    <image id="n0_jj4d" name="n0" src="pjip1j" fileName="imagesExport/tujian_lwlw_1.png" xy="0,0">
+      <gearDisplay controller="c1" pages="1"/>
+      <relation target="" sidePair="width-width,height-height"/>
+    </image>
+    <image id="n1_jj4d" name="n1" src="pjip1c" fileName="imagesExport/tujian_lwlw_2.png" xy="0,0">
+      <gearDisplay controller="c1" pages="0"/>
+    </image>
+  </displayList>
+  <Button/>
+</component>

+ 0 - 0
FGUIProject/assets/FieldGuide/components/ListTrevalItem.xml → FGUIProject/assets/FieldGuide/components/ListTravelAreaItem.xml


+ 14 - 0
FGUIProject/assets/FieldGuide/components/ListTravelLocationItem.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="740,622">
+  <displayList>
+    <loader id="n17_s61p" name="loaLocation" xy="370,310" pivot="0.5,0.5" anchor="true" size="740,622" url="ui://vqq9h9h4s61p2c" align="center" vAlign="middle" fill="scaleMatchHeight">
+      <relation target="" sidePair="center-center,middle-middle"/>
+    </loader>
+    <text id="n18_s61p" name="txtName" xy="434,24" size="292,64" fontSize="48" color="#816b4d" text="白金黑松露精">
+      <relation target="" sidePair="left-left,top-bottom"/>
+    </text>
+    <text id="n19_s61p" name="txtCount" xy="267,563" pivot="0.5,0" size="206,49" fontSize="36" color="#907656" text="已到达:2次">
+      <relation target="" sidePair="left-left,top-bottom"/>
+    </text>
+  </displayList>
+</component>

+ 3 - 1
FGUIProject/assets/FieldGuide/package.xml

@@ -71,7 +71,9 @@
     <component id="s61p2i" name="ChapterItemShowUI.xml" path="/" exported="true"/>
     <component id="wono2j" name="TravelGuideUI.xml" path="/" exported="true"/>
     <component id="wono2k" name="TravelShowUI.xml" path="/" exported="true"/>
-    <component id="wono2l" name="ListTrevalItem.xml" path="/components/"/>
+    <component id="wono2l" name="ListTravelAreaItem.xml" path="/components/"/>
+    <component id="wono2m" name="ListTravelLocationItem.xml" path="/components/"/>
+    <component id="wono2n" name="Button5.xml" path="/components/"/>
   </resources>
   <publish name="" path="..\GameClient\Assets\ResIn\UI\FieldGuide" packageCount="2" genCode="true" extractAlpha="true"/>
 </packageDescription>

+ 71 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/FieldGuide/UI_Button5.cs

@@ -0,0 +1,71 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.FieldGuide
+{
+    public partial class UI_Button5
+    {
+        public GButton target;
+        public Controller m_c1;
+        public const string URL = "ui://vqq9h9h4wono2n";
+        public const string PACKAGE_NAME = "FieldGuide";
+        public const string RES_NAME = "Button5";
+        private static UI_Button5 _proxy;
+
+        public static UI_Button5 Create(GObject gObject = null)
+        {
+            var ui = new UI_Button5();
+            if(gObject == null)
+            	ui.target =  (GButton)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GButton)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static UI_Button5 Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_Button5();
+            }
+            var ui = _proxy;
+            if(gObject == null)
+            	ui.target =  (GButton)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GButton)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/FieldGuide/UI_Button5.cs.meta

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

+ 71 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/FieldGuide/UI_ListTravelAreaItem.cs

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

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/FieldGuide/UI_ListTravelAreaItem.cs.meta

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

+ 77 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/FieldGuide/UI_ListTravelLocationItem.cs

@@ -0,0 +1,77 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.FieldGuide
+{
+    public partial class UI_ListTravelLocationItem
+    {
+        public GComponent target;
+        public GLoader m_loaLocation;
+        public GTextField m_txtName;
+        public GTextField m_txtCount;
+        public const string URL = "ui://vqq9h9h4wono2m";
+        public const string PACKAGE_NAME = "FieldGuide";
+        public const string RES_NAME = "ListTravelLocationItem";
+        private static UI_ListTravelLocationItem _proxy;
+
+        public static UI_ListTravelLocationItem Create(GObject gObject = null)
+        {
+            var ui = new UI_ListTravelLocationItem();
+            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_ListTravelLocationItem Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_ListTravelLocationItem();
+            }
+            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_loaLocation = (GLoader)comp.GetChild("loaLocation");
+            m_txtName = (GTextField)comp.GetChild("txtName");
+            m_txtCount = (GTextField)comp.GetChild("txtCount");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_loaLocation = null;
+            m_txtName = null;
+            m_txtCount = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/FieldGuide/UI_ListTravelLocationItem.cs.meta

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

+ 7 - 9
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/FieldGuide/UI_TravelShowUI.cs

@@ -9,9 +9,8 @@ namespace UI.FieldGuide
         public GComponent target;
         public GLoader m_loaBg;
         public GButton m_btnBack;
-        public GLoader m_loaItem;
-        public GTextField m_txtTitle;
-        public GTextField m_txtDesc;
+        public GList m_list;
+        public UI_Button5 m_btnReward;
         public const string URL = "ui://vqq9h9h4wono2k";
         public const string PACKAGE_NAME = "FieldGuide";
         public const string RES_NAME = "TravelShowUI";
@@ -61,17 +60,16 @@ namespace UI.FieldGuide
         {
             m_loaBg = (GLoader)comp.GetChild("loaBg");
             m_btnBack = (GButton)comp.GetChild("btnBack");
-            m_loaItem = (GLoader)comp.GetChild("loaItem");
-            m_txtTitle = (GTextField)comp.GetChild("txtTitle");
-            m_txtDesc = (GTextField)comp.GetChild("txtDesc");
+            m_list = (GList)comp.GetChild("list");
+            m_btnReward = (UI_Button5)UI_Button5.Create(comp.GetChild("btnReward"));
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_loaBg = null;
             m_btnBack = null;
-            m_loaItem = null;
-            m_txtTitle = null;
-            m_txtDesc = null;
+            m_list = null;
+            m_btnReward.Dispose();
+            m_btnReward = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/FieldGuide/FieldGuideView.cs

@@ -11,7 +11,7 @@ namespace GFGGame
 
         private UI_FieldGuideUI _ui;
         private int[] _listBannerDatas = new int[3] { ConstBannerId.ZHAI_XING, ConstBannerId.ZHAI_XING, ConstBannerId.ZHAI_XING };
-        private int[] _listGuideDatas = new int[2] { ConstFieldGuideId.SUIT_GUIDE, ConstFieldGuideId.CHAPTER_ITEM };
+        private int[] _listGuideDatas = new int[3] { ConstFieldGuideId.SUIT_GUIDE, ConstFieldGuideId.CHAPTER_ITEM, ConstFieldGuideId.TRAVEL_GUIDE };
         GetRedCall[] actions = new GetRedCall[] { RedDotDataManager.Instance.GetFieldGuideRed, null };
 
         public override void Dispose()

+ 9 - 0
GameClient/Assets/Game/HotUpdate/Views/FieldGuide/TravelGuideView.cs

@@ -41,11 +41,13 @@ namespace GFGGame
         {
             base.OnShown();
 
+            _ui.m_list.numItems = TravelGuideCfgArray.Instance.dataArray.Length;
         }
 
         protected override void OnHide()
         {
             base.OnHide();
+            if (_ui.m_list.numItems > 0) _ui.m_list.ScrollToView(0);
         }
         protected override void RemoveEventListener()
         {
@@ -58,11 +60,18 @@ namespace GFGGame
 
         private void RenderListItem(int index, GObject obj)
         {
+            TravelGuideCfg cfg = TravelGuideCfgArray.Instance.dataArray[index];
+            UI_ListTravelAreaItem item = UI_ListTravelAreaItem.Proxy(obj);
 
+            item.target.data = cfg;
+            UI_ListTravelAreaItem.ProxyEnd();
         }
         private void OnListItemClick(EventContext context)
         {
+            GObject obj = context.sender as GObject;
+            TravelGuideCfg cfg = obj.data as TravelGuideCfg;
 
+            ViewManager.Show<TravelShowView>(cfg, new object[] { typeof(TravelShowView).FullName, this.viewData });
         }
     }
 }

+ 20 - 2
GameClient/Assets/Game/HotUpdate/Views/FieldGuide/TravelShowView.cs

@@ -8,7 +8,7 @@ namespace GFGGame
     public class TravelShowView : BaseWindow
     {
         private UI_TravelShowUI _ui;
-        private CulturalRelicCfg _cfg;
+        private TravelGuideCfg _cfg;
 
         public override void Dispose()
         {
@@ -29,6 +29,9 @@ namespace GFGGame
             isfullScreen = true;
 
             _ui.m_btnBack.onClick.Add(OnClickBtnBack);
+            _ui.m_btnReward.target.onClick.Add(OnBtnRewardClick);
+
+            _ui.m_list.itemRenderer = RenderListItem;
 
             _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("tjtj_bjbj");
 
@@ -37,7 +40,7 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
-
+            _cfg = this.viewData as TravelGuideCfg;
 
             UpdateView();
         }
@@ -63,5 +66,20 @@ namespace GFGGame
         {
 
         }
+
+        private void RenderListItem(int index, GObject obj)
+        {
+            UI_ListTravelLocationItem item = UI_ListTravelLocationItem.Proxy(obj);
+
+
+            UI_ListTravelLocationItem.ProxyEnd();
+        }
+
+        private void OnBtnRewardClick()
+        {
+
+            List<ItemData> rewards = ItemUtil.CreateItemDataList(_cfg.rewardsArr);
+            ViewManager.Show<RewardPreView>(new object[] { rewards, "活跃度奖励", "到达该区域所有地点时可领取" });
+        }
     }
 }

BIN
GameClient/Assets/ResIn/UI/FieldGuide/FieldGuide_fui.bytes