zhaoyang 2 anni fa
parent
commit
f8ce140f47

+ 3 - 3
FGUIProject/assets/Main/MainUI.xml

@@ -58,12 +58,12 @@
       <relation target="" sidePair="middle-middle"/>
       <Button icon="ui://mfvz4q8kv482fr"/>
     </component>
-    <component id="n60_wono" name="btnTravel" src="q08xu" fileName="components/ButtonModle1.xml" xy="1348,734" size="77,256" group="n58_oju1">
+    <component id="n60_wono" name="btnTravel" src="q08xu" fileName="components/ButtonModle1.xml" xy="2028,1218" size="77,256" group="n58_oju1">
       <relation target="" sidePair="middle-middle"/>
       <Button icon="ui://mfvz4q8kv482fr"/>
     </component>
-    <group id="n58_oju1" name="grpRight" xy="1293,628" size="766,1199" group="n59_oju1" advanced="true"/>
-    <group id="n59_oju1" name="grpMove" xy="0,160" size="2059,1718" advanced="true"/>
+    <group id="n58_oju1" name="grpRight" xy="1293,628" size="812,1199" group="n59_oju1" advanced="true"/>
+    <group id="n59_oju1" name="grpMove" xy="0,160" size="2105,1718" advanced="true"/>
   </displayList>
   <transition name="t1">
     <item time="0" type="Alpha" target="n57_oju1" tween="true" startValue="1" endValue="0" duration="6" ease="Linear"/>

+ 10 - 0
FGUIProject/assets/Travel/TravelUI.xml

@@ -23,5 +23,15 @@
     <text id="n4_wono" name="txtTime" xy="425,1463" pivot="0.5,0" size="230,42" fontSize="30" text="大约5小时后归来">
       <gearDisplay controller="c1" pages="1"/>
     </text>
+    <component id="n5_wono" name="btnPhoto" src="wono5" fileName="components/Button3.xml" xy="194,1682" size="227,132">
+      <Button title="相册"/>
+    </component>
+    <component id="n6_wono" name="btnFieldGuide" src="wono5" fileName="components/Button3.xml" xy="687,1682" size="227,132">
+      <Button title="图鉴"/>
+    </component>
+    <component id="n7_wono" name="btnback" src="uyuxtj5" fileName="components/BtnBack.xml" pkg="eg2y0ldp" xy="34,60">
+      <relation target="" sidePair="left-left,top-top"/>
+      <Button icon="ui://eg2y0ldpuyuxtj4"/>
+    </component>
   </displayList>
 </component>

+ 22 - 0
FGUIProject/assets/Travel/components/Button3.xml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="100,20" extention="Button">
+  <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
+  <displayList>
+    <graph id="n0_wono" name="n0" xy="0,0" size="100,20" touchable="false" type="rect" lineSize="0" fillColor="#fff0f0f0">
+      <gearDisplay controller="button" pages="0"/>
+      <relation target="" sidePair="width-width,height-height"/>
+    </graph>
+    <graph id="n1_wono" name="n1" xy="0,0" size="100,20" touchable="false" type="rect" lineSize="0" fillColor="#fffafafa">
+      <gearDisplay controller="button" pages="2"/>
+      <relation target="" sidePair="width-width,height-height"/>
+    </graph>
+    <graph id="n2_wono" name="n2" xy="0,0" size="100,20" touchable="false" type="rect" lineSize="0" fillColor="#ffcccccc">
+      <gearDisplay controller="button" pages="1,3"/>
+      <relation target="" sidePair="width-width,height-height"/>
+    </graph>
+    <text id="n3_wono" name="title" xy="45,-11" pivot="0.5,0.5" size="10,42" fontSize="30" text="">
+      <relation target="" sidePair="center-center,middle-middle"/>
+    </text>
+  </displayList>
+  <Button/>
+</component>

+ 1 - 0
FGUIProject/assets/Travel/package.xml

@@ -6,6 +6,7 @@
     <component id="wono2" name="TravelRewardUI.xml" path="/" exported="true"/>
     <component id="wono3" name="Button1.xml" path="/components/"/>
     <component id="wono4" name="Button2.xml" path="/components/"/>
+    <component id="wono5" name="Button3.xml" path="/components/"/>
   </resources>
   <publish name="" path="..\GameClient\Assets\ResIn\UI\Travel" packageCount="2" genCode="true"/>
 </packageDescription>

+ 6 - 0
GameClient/Assets/Game/HotUpdate/Constant/ConstFunctionId.cs

@@ -38,6 +38,7 @@ namespace GFGGame
         /// 自动战斗
         /// </summary>
         public const string FUNCTION_AUTOPLAY_FIGHT = "FUNCTION_AUTOPLAY_FIGHT";
+
         /// <summary>
         /// 商城-道具兑换
         /// </summary>
@@ -51,5 +52,10 @@ namespace GFGGame
         /// </summary>
         public const string SUIT_FOSTER = "SUIT_FOSTER";
 
+        /// <summary>
+        /// 主界面二级界面
+        /// </summary>
+        public const string MAIN_SECOND_VIEW = "MAIN_SECOND_VIEW";
+
     }
 }

+ 24 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Travel/UI_TravelUI.cs

@@ -7,7 +7,15 @@ namespace UI.Travel
     public partial class UI_TravelUI
     {
         public GComponent target;
+        public Controller m_c1;
         public GLoader m_loaBg;
+        public GButton m_btnTips;
+        public GButton m_btnGo;
+        public GButton m_btnGet;
+        public GTextField m_txtTime;
+        public GButton m_btnPhoto;
+        public GButton m_btnFieldGuide;
+        public GButton m_btnback;
         public const string URL = "ui://jitclg1gwono0";
         public const string PACKAGE_NAME = "Travel";
         public const string RES_NAME = "TravelUI";
@@ -55,11 +63,27 @@ namespace UI.Travel
 
         private void Init(GComponent comp)
         {
+            m_c1 = comp.GetController("c1");
             m_loaBg = (GLoader)comp.GetChild("loaBg");
+            m_btnTips = (GButton)comp.GetChild("btnTips");
+            m_btnGo = (GButton)comp.GetChild("btnGo");
+            m_btnGet = (GButton)comp.GetChild("btnGet");
+            m_txtTime = (GTextField)comp.GetChild("txtTime");
+            m_btnPhoto = (GButton)comp.GetChild("btnPhoto");
+            m_btnFieldGuide = (GButton)comp.GetChild("btnFieldGuide");
+            m_btnback = (GButton)comp.GetChild("btnback");
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_c1 = null;
             m_loaBg = null;
+            m_btnTips = null;
+            m_btnGo = null;
+            m_btnGet = null;
+            m_txtTime = null;
+            m_btnPhoto = null;
+            m_btnFieldGuide = null;
+            m_btnback = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 8 - 0
GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

@@ -126,6 +126,7 @@ namespace GFGGame
             _ui.m_btnField.target.onClick.Add(OnClickBtnField);
             _ui.m_headBar.target.onClick.Add(OnClickHeadBar);
             _ui.m_btnPoem.target.onClick.Add(OnClickBtnPoem);
+            _ui.m_btnTravel.target.onClick.Add(OnClickBtnTravel);
 
             _btnStore.onClick.Add(OnClickBtnStore);
             _btnTuJian.onClick.Add(OnClickBtnTuJian);
@@ -247,6 +248,7 @@ namespace GFGGame
         private void OnSwipe(EventContext context)
         {
             if (!MainDataManager.Instance.CanSwipe) return;
+            if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(ConstFunctionId.MAIN_SECOND_VIEW)) return;
 
             SwipeGesture swipeture = (SwipeGesture)context.sender;
             if (MainDataManager.Instance.ViewType == 0 && swipeture.position.x < 0 && swipeture.position.y < -swipeture.position.x && swipeture.position.y > swipeture.position.x)
@@ -452,6 +454,12 @@ namespace GFGGame
 
             ViewManager.Show<PoemView>(null, new object[] { ViewName.MAINUI_VIEW, this.viewData });
         }
+        private void OnClickBtnTravel()
+        {
+            // LogServerHelper.SendNodeLog((int)PlayParticipationEnum.TIAN_YE_DIAO_CHA, 1);
+
+            ViewManager.Show<TravelView>(null, new object[] { ViewName.MAINUI_VIEW, this.viewData });
+        }
         private void OnClickBtnBag()
         {
             ViewManager.Show<BagView>(null, new object[] { ViewName.MAINUI_VIEW, this.viewData });

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/Poem/PoemPhotoView.cs

@@ -52,6 +52,7 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
+            _ui.m_c1.selectedIndex = (this.viewData == null) ? (int)PictureSourceType.PersonalAlbum : (int)this.viewData;
             OnBtnTabChange();
         }
 

+ 22 - 1
GameClient/Assets/Game/HotUpdate/Views/Travel/TraveView.cs → GameClient/Assets/Game/HotUpdate/Views/Travel/TravelView.cs

@@ -5,7 +5,7 @@ using UnityEngine;
 
 namespace GFGGame
 {
-    public class TraveView : BaseWindow
+    public class TravelView : BaseWindow
     {
         private UI_TravelUI _ui;
 
@@ -26,7 +26,13 @@ namespace GFGGame
             _ui = UI_TravelUI.Create();
             this.viewCom = _ui.target;
             isfullScreen = true;
+
+            _ui.m_btnback.onClick.Add(OnBtnBackClick);
+            _ui.m_btnPhoto.onClick.Add(OnBtnPhotoClick);
+            _ui.m_btnFieldGuide.onClick.Add(OnBtnFieldGuideClick);
+
             _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("gzs_bjbj");
+
         }
         protected override void AddEventListener()
         {
@@ -50,5 +56,20 @@ namespace GFGGame
             base.RemoveEventListener();
 
         }
+
+        private void OnBtnBackClick()
+        {
+            ViewManager.GoBackFrom(typeof(PoemView).FullName);
+        }
+
+        private void OnBtnPhotoClick()
+        {
+            ViewManager.Show<PoemPhotoView>(PictureSourceType.WanShuiQianShan, new object[] { typeof(TravelView).FullName, this.viewData });
+        }
+
+        private void OnBtnFieldGuideClick()
+        {
+            ViewManager.Show<TravelGuideView>(null, new object[] { typeof(TravelView).FullName, this.viewData });
+        }
     }
 }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Travel/TraveView.cs.meta → GameClient/Assets/Game/HotUpdate/Views/Travel/TravelView.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: ff7beb605d3e0f4498d77423bd7590bb
+guid: af86185d87357df44bad7027748e7e88
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

BIN
GameClient/Assets/ResIn/UI/Main/Main_fui.bytes


BIN
GameClient/Assets/ResIn/UI/Travel/Travel_fui.bytes