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

+ 4 - 4
FGUIProject/assets/Common/FloatingTextPromptNarmalUI.xml

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="1040,70" opaque="false">
+<component size="1040,70" pivot="0.5,0.5" anchor="true" opaque="false">
   <displayList>
-    <image id="n2_s2cc" name="n2" src="qp4l4q" fileName="imagesExport/zx_jq_rwbszik_normal.png" xy="0,0">
-      <relation target="n4_s2cc" sidePair="width-width"/>
+    <image id="n2_s2cc" name="n2" src="qp4l4q" fileName="imagesExport/zx_jq_rwbszik_normal.png" xy="520,35" pivot="0.5,0.5" anchor="true">
+      <relation target="" sidePair="center-center"/>
     </image>
-    <text id="n4_s2cc" name="txtMessage" xy="422,13" size="196,44" fontSize="32" color="#e8dbb3" align="center" singleLine="true" autoClearText="true" text="这是一个提示">
+    <text id="n4_s2cc" name="txtMessage" xy="520,35" pivot="0.5,0.5" anchor="true" size="324,44" fontSize="32" color="#e8dbb3" align="center" singleLine="true" autoClearText="true" text="今日购买次数已达上限">
       <relation target="n2_s2cc" sidePair="center-center"/>
     </text>
   </displayList>

+ 1 - 1
FGUIProject/assets/Studio/StudioEctypeUI.xml

@@ -19,7 +19,7 @@
       <item/>
       <item/>
     </list>
-    <list id="n16_n3xh" name="list" xy="39,516" pivot="0.5,0" size="1002,1406" overflow="scroll" lineGap="63" defaultItem="ui://xz8kxrecn3xha" align="center">
+    <list id="n16_n3xh" name="list" xy="39,516" pivot="0.5,0" size="1002,1406" overflow="scroll" scrollBarFlags="2" lineGap="63" defaultItem="ui://xz8kxrecn3xha" align="center">
       <gearXY controller="c1" pages="0,1" values="39,320|39,516"/>
       <gearSize controller="c1" pages="0,1" values="1002,1600,1,1|1002,1406,1,1"/>
       <relation target="" sidePair="bottomext-bottom"/>

+ 2 - 2
FGUIProject/assets/Studio/StudioUI.xml

@@ -7,11 +7,11 @@
     <component id="n1_rbxq" name="btnBack" src="9xlo8" fileName="components/ButtonBack1.xml" pkg="eg2y0ldp" xy="35,80"/>
     <component id="n2_rbxq" name="comMetal" src="rbxq5" fileName="components/ComEctype.xml" xy="840,910">
       <relation target="" sidePair="right-right,bottom-bottom"/>
-      <property target="icon" propertyId="1" value="ui://xz8kxreckqhd19"/>
+      <property target="icon" propertyId="1" value="ui://xz8kxreckqhd17"/>
     </component>
     <component id="n3_rbxq" name="comFabric" src="rbxq5" fileName="components/ComEctype.xml" xy="30,1064">
       <relation target="" sidePair="left-left,bottom-bottom"/>
-      <property target="icon" propertyId="1" value="ui://xz8kxreckqhd17"/>
+      <property target="icon" propertyId="1" value="ui://xz8kxreckqhd19"/>
     </component>
     <component id="n4_rbxq" name="comProperty" src="rbxq5" fileName="components/ComEctype.xml" xy="30,1345">
       <relation target="" sidePair="left-left,bottom-bottom"/>

+ 4 - 6
FGUIProject/assets/Studio/components/ListPropertyItem.xml

@@ -1,16 +1,14 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="174,174" extention="Button">
-  <controller name="button" pages="0,up,1,down,2,lock" selected="1"/>
+  <controller name="button" pages="0,up,1,down" selected="1"/>
   <displayList>
-    <loader id="n8_kqhd" name="n8" xy="1,1" size="172,172" url="ui://xz8kxreckqhdu" autoSize="true">
+    <loader id="n8_kqhd" name="icon0" xy="1,1" size="172,172" url="ui://xz8kxreckqhdu" autoSize="true">
       <gearDisplay controller="button" pages="1"/>
     </loader>
-    <loader id="n9_kqhd" name="n9" xy="1,0" size="172,173" url="ui://xz8kxreckqhdq" autoSize="true">
+    <loader id="n9_kqhd" name="icon1" xy="1,0" size="172,173" url="ui://xz8kxreckqhdq" autoSize="true">
       <gearDisplay controller="button" pages="0"/>
     </loader>
-    <loader id="n10_kqhd" name="n10" xy="0,0" size="174,174" url="ui://xz8kxreckqhd12" autoSize="true">
-      <gearDisplay controller="button" pages="2"/>
-    </loader>
+    <loader id="n10_kqhd" name="icon2" xy="0,0" size="174,174" url="ui://xz8kxreckqhd12" autoSize="true"/>
   </displayList>
   <Button mode="Radio"/>
 </component>

+ 12 - 12
FGUIProject/assets/Studio/package.xml

@@ -12,22 +12,22 @@
     <component id="n3xhn" name="ListPropertyItem.xml" path="/components/"/>
     <image id="kqhdo" name="zpsxian_1.png" path="/images/"/>
     <image id="kqhdp" name="gzs_bjbj.png" path="/images/" atlas="alone_npot"/>
-    <image id="kqhdq" name="gzsatb_1.png" path="/images/"/>
-    <image id="kqhdr" name="gzsatb_2.png" path="/images/"/>
+    <image id="kqhdq" name="gzsatb_1.png" path="/images/" exported="true"/>
+    <image id="kqhdr" name="gzsatb_2.png" path="/images/" exported="true"/>
     <image id="kqhds" name="gzsdi_1.png" path="/images/"/>
     <image id="kqhdt" name="gzsdi_2.png" path="/images/"/>
-    <image id="kqhdu" name="gzsltb_1.png" path="/images/"/>
-    <image id="kqhdv" name="gzsltb_2.png" path="/images/"/>
-    <image id="kqhdw" name="gzsltb_3.png" path="/images/"/>
-    <image id="kqhdx" name="gzsltb_4.png" path="/images/"/>
+    <image id="kqhdu" name="gzsltb_1.png" path="/images/" exported="true"/>
+    <image id="kqhdv" name="gzsltb_2.png" path="/images/" exported="true"/>
+    <image id="kqhdw" name="gzsltb_3.png" path="/images/" exported="true"/>
+    <image id="kqhdx" name="gzsltb_4.png" path="/images/" exported="true"/>
     <image id="kqhdy" name="gzssuo.png" path="/images/"/>
     <image id="kqhdz" name="gzsxian_2.png" path="/images/" scale="9grid" scale9grid="0,635,0,681"/>
-    <image id="kqhd10" name="gzsatb_3.png" path="/images/"/>
-    <image id="kqhd11" name="gzsatb_4.png" path="/images/"/>
-    <image id="kqhd12" name="gzswtb_1.png" path="/images/"/>
-    <image id="kqhd13" name="gzswtb_2.png" path="/images/"/>
-    <image id="kqhd14" name="gzswtb_3.png" path="/images/"/>
-    <image id="kqhd15" name="gzswtb_4.png" path="/images/"/>
+    <image id="kqhd10" name="gzsatb_3.png" path="/images/" exported="true"/>
+    <image id="kqhd11" name="gzsatb_4.png" path="/images/" exported="true"/>
+    <image id="kqhd12" name="gzswtb_1.png" path="/images/" exported="true"/>
+    <image id="kqhd13" name="gzswtb_2.png" path="/images/" exported="true"/>
+    <image id="kqhd14" name="gzswtb_3.png" path="/images/" exported="true"/>
+    <image id="kqhd15" name="gzswtb_4.png" path="/images/" exported="true"/>
     <image id="kqhd16" name="zjm_rk_11.png" path="/images/"/>
     <image id="kqhd17" name="zjm_rk_8.png" path="/images/"/>
     <image id="kqhd18" name="zjm_rk_9.png" path="/images/"/>

+ 1 - 1
GameClient/Assets/Game/CSShare

@@ -1 +1 @@
-Subproject commit 8ee18dca94688b1f87f805599ab1701cf0ea71c3
+Subproject commit 7602c99cbcdf9fb220b2220ed8b696dd2a2e0ce0

+ 77 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Studio/UI_ListPropertyItem.cs

@@ -0,0 +1,77 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.Studio
+{
+    public partial class UI_ListPropertyItem
+    {
+        public GButton target;
+        public GLoader m_icon0;
+        public GLoader m_icon1;
+        public GLoader m_icon2;
+        public const string URL = "ui://xz8kxrecn3xhn";
+        public const string PACKAGE_NAME = "Studio";
+        public const string RES_NAME = "ListPropertyItem";
+        private static UI_ListPropertyItem _proxy;
+
+        public static UI_ListPropertyItem Create(GObject gObject = null)
+        {
+            var ui = new UI_ListPropertyItem();
+            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_ListPropertyItem Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_ListPropertyItem();
+            }
+            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_icon0 = (GLoader)comp.GetChild("icon0");
+            m_icon1 = (GLoader)comp.GetChild("icon1");
+            m_icon2 = (GLoader)comp.GetChild("icon2");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_icon0 = null;
+            m_icon1 = null;
+            m_icon2 = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Studio/UI_ListPropertyItem.cs.meta

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

+ 12 - 4
GameClient/Assets/Game/HotUpdate/Utils/NumberUtil.cs

@@ -4,7 +4,7 @@ namespace GFGGame
 {
     public class NumberUtil
     {
-        
+
         public static string GetChiniseNumberText(int num)
         {
             int numInUnit = 0;
@@ -15,18 +15,18 @@ namespace GFGGame
             {
                 return GameConst.CHINESE_NUMBER[num - 1];
             }
-            else if(num < 20)
+            else if (num < 20)
             {
                 numInUnit = num - 10;
                 strInUnit = GameConst.CHINESE_NUMBER[numInUnit - 1];
                 return "十" + strInUnit;
             }
-            else if(num < 100)
+            else if (num < 100)
             {
                 numInTen = Mathf.FloorToInt(num / 10);
                 strInTen = GameConst.CHINESE_NUMBER[numInTen - 1];
                 numInUnit = num % 10;
-                if(numInUnit == 0)
+                if (numInUnit == 0)
                 {
                     return strInTen + "十";
                 }
@@ -38,6 +38,14 @@ namespace GFGGame
             }
             return "未知";
         }
+        public static string GetChiniseNumberWeekText(int num)
+        {
+            if (num >= 0 && num < GameConst.CHINESE_NUMBER.Length)
+            {
+                return GameConst.CHINESE_WEEK_NUMBER[num];
+            }
+            return "未知";
+        }
 
     }
 }

+ 4 - 3
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioBaseView.cs

@@ -15,7 +15,7 @@ namespace GFGGame
         protected StudioCfg studioCfg;
         protected StoryLevelCfg[] storyLevelCfgs;
         protected StudioData studioData;
-        private int curIndex = 0;
+        protected int curIndex = 0;
 
         public override void Dispose()
         {
@@ -47,7 +47,6 @@ namespace GFGGame
         {
             base.OnShown();
             _valueBarController.OnShown();
-            _ui.m_list.ScrollToView(curIndex);
             UpdateView();
             Timers.inst.Add(1, 0, UpdateShowTime);
 
@@ -64,7 +63,7 @@ namespace GFGGame
             EventAgent.RemoveEventListener(ConstMessage.BUY_STUDIO_PLAY_TIMES, UpdateView);
             EventAgent.RemoveEventListener(ConstMessage.NOTICE_STUDIO_PLAY_TIMES, UpdateView);
         }
-        private void UpdateView()
+        protected void UpdateView()
         {
             _ui.m_txtNum.text = string.Format("剩余次数:{0}/{1}", this.studioData.TotalPlayTimes - this.studioData.PlayTimes, studioCfg.num);
         }
@@ -97,6 +96,8 @@ namespace GFGGame
                 PromptController.Instance.ShowFloatTextPrompt(content);
                 return;
             }
+            StudioDataManager.Instance.PROPERTY_SELECT_INDEX = _ui.m_listProperty.selectedIndex;
+            StudioDataManager.Instance.TYPE_SELECT_INDEX = _ui.m_c1.selectedIndex;
             InstanceZonesController.ShowLevelView(storyLevelCfg.id, StudioDataManager.Instance.OnFinishStoryLevel);
         }
 

+ 2 - 0
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioFabricView.cs

@@ -31,6 +31,8 @@ namespace GFGGame
             this.studioData = StudioDataManager.Instance.GetStudioDataById(this.studioCfg.id);
             this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
             _ui.m_list.numItems = this.storyLevelCfgs.Length;
+            _ui.m_list.ScrollToView(curIndex);
+
             base.OnShown();
 
         }

+ 2 - 0
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioMetalView.cs

@@ -33,6 +33,8 @@ namespace GFGGame
             this.studioData = StudioDataManager.Instance.GetStudioDataById(this.studioCfg.id);
             this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
             _ui.m_list.numItems = this.storyLevelCfgs.Length;
+            _ui.m_list.ScrollToView(curIndex);
+
             base.OnShown();
         }
 

+ 44 - 12
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioPropertyView.cs

@@ -8,6 +8,9 @@ namespace GFGGame
 {
     public class StudioPropertyView : StudioBaseView
     {
+        private int _propertySelectIndex = 0;
+        private int _typeSelectIndex = 0;
+        private int firstOpenProperty = -1;//第一个开放的副本(打开界面时,如未选择副本,则默认选中第一个开启的副本)
         //书画副本
         public override void Dispose()
         {
@@ -24,20 +27,25 @@ namespace GFGGame
 
         protected override void OnShown()
         {
+            firstOpenProperty = -1;
+            _typeSelectIndex = (int)(this.viewData as object[])[0];
+            _propertySelectIndex = (int)(this.viewData as object[])[1];
+            _ui.m_c1.selectedIndex = _typeSelectIndex;
+
             StudioDataManager.Instance.VIEW_NAME = typeof(StudioPropertyView).Name;
             StudioCfg[] studioCfgs = StudioCfgArray.Instance.GetCfgs(typeof(StudioPropertyView).Name);
-            this.studioCfg = studioCfgs[0];
-            this.studioData = StudioDataManager.Instance.GetStudioDataById(this.studioCfg.id);
-            this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
-
-            _ui.m_c1.selectedIndex = (int)(this.viewData as object[])[0];
-            StudioDataManager.Instance.TYPE_SELECT_INDEX = _ui.m_c1.selectedIndex;
 
             _ui.m_listProperty.numItems = studioCfgs.Length;
-            _ui.m_listProperty.selectedIndex = (int)(this.viewData as object[])[1];
-            StudioDataManager.Instance.PROPERTY_SELECT_INDEX = _ui.m_listProperty.selectedIndex;
+            _propertySelectIndex = TimeUtil.CheckDayOfWeek(studioCfgs[_propertySelectIndex].timeArr) ? _propertySelectIndex : firstOpenProperty;
+            _ui.m_listProperty.selectedIndex = _propertySelectIndex;
+
+            this.studioCfg = studioCfgs[_ui.m_listProperty.selectedIndex];
+            this.studioData = StudioDataManager.Instance.GetStudioDataById(this.studioCfg.id);
+            this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
 
             _ui.m_list.numItems = this.storyLevelCfgs.Length;
+            _ui.m_list.ScrollToView(curIndex);
+
             base.OnShown();
 
         }
@@ -54,18 +62,42 @@ namespace GFGGame
         }
         private void ListPropertyItemRender(int index, GObject obj)
         {
+            StudioCfg[] studioCfgs = StudioCfgArray.Instance.GetCfgs(typeof(StudioPropertyView).Name);
             GButton item = obj.asButton;
-
-            item.data = StudioCfgArray.Instance.GetCfgs(typeof(StudioPropertyView).Name)[index];
+            item.GetChild("icon0").asLoader.url = string.Format("ui://Studio/gzsltb_{0}", index + 1);
+            item.GetChild("icon1").asLoader.url = string.Format("ui://Studio/gzsatb_{0}", index + 1);
+            item.GetChild("icon2").asLoader.url = string.Format("ui://Studio/gzswtb_{0}", index + 1);
+            item.GetChild("icon2").asLoader.visible = TimeUtil.CheckDayOfWeek(studioCfgs[index].timeArr) ? false : true;
+            if (firstOpenProperty < 0 && TimeUtil.CheckDayOfWeek(studioCfgs[index].timeArr)) firstOpenProperty = index;
+            item.data = index;
         }
         private void OnClickListProperty(EventContext context)
         {
-            GButton item = (context.data as GObject).asButton;
 
-            this.studioCfg = item.data as StudioCfg;
+            GButton item = (context.data as GObject).asButton;
+            int index = (int)item.data;
+            StudioCfg[] studioCfgs = StudioCfgArray.Instance.GetCfgs(typeof(StudioPropertyView).Name);
+            StudioCfg studioCfg = studioCfgs[index];
+            if (!TimeUtil.CheckDayOfWeek(studioCfg.timeArr))
+            {
+                _ui.m_listProperty.selectedIndex = _propertySelectIndex;
+                string str = "";
+                for (int i = 0; i < studioCfg.timeArr.Length; i++)
+                {
+                    str += NumberUtil.GetChiniseNumberWeekText(studioCfg.timeArr[i]);
+                    if (i == studioCfg.timeArr.Length - 1) break;
+                    str += "、";
+                }
+                PromptController.Instance.ShowFloatTextPrompt(string.Format("周{0}开放", str));
+                return;
+            }
+            _propertySelectIndex = index;
+            this.studioCfg = studioCfg;
             this.studioData = StudioDataManager.Instance.GetStudioDataById(this.studioCfg.id);
             this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
             _ui.m_list.numItems = this.storyLevelCfgs.Length;
+            _ui.m_list.ScrollToView(curIndex);
+            UpdateView();
             StudioDataManager.Instance.PROPERTY_SELECT_INDEX = _ui.m_listProperty.selectedIndex;
 
         }

BIN
GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes


BIN
GameClient/Assets/ResIn/UI/Common/Common_fui.bytes


BIN
GameClient/Assets/ResIn/UI/Studio/Studio_atlas0.png


BIN
GameClient/Assets/ResIn/UI/Studio/Studio_fui.bytes