Bladeren bron

领取画廊奖励

zhaoyang 2 jaren geleden
bovenliggende
commit
84312a3f90

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

@@ -175,7 +175,7 @@
     <image id="si5ztic" name="tc_txbiao.png" path="/imgnew/"/>
     <image id="si5ztie" name="tc_tydikua_3.png" path="/imgnew/"/>
     <image id="si5ztif" name="tc_tydikua_52.png" path="/imgnew/"/>
-    <image id="si5ztig" name="tc_xiant.png" path="/imgnew/"/>
+    <image id="si5ztig" name="tc_xiant.png" path="/imgnew/" exported="true"/>
     <component id="si5ztih" name="ComBg.xml" path="/components/" exported="true"/>
     <image id="si5ztii" name="tc_txbiao_1.png" path="/imgFunIcon/" exported="true"/>
     <image id="s5s9tij" name="js_icon_.png" path="/imgFunIcon/" exported="true"/>

+ 17 - 0
FGUIProject/assets/poem/PoemGalleryRewardGetUI.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="962,703">
+  <displayList>
+    <component id="n7_r9ri" name="n7" src="si5ztih" fileName="components/ComBg.xml" pkg="eg2y0ldp" xy="0,0" size="962,703"/>
+    <text id="n3_r9ri" name="n3" xy="329,60" size="232,61" group="n4_r9ri" font="ui://eg2y0ldpwonotja" fontSize="46" color="#8a7253" text="上期排名:"/>
+    <text id="n8_r9ri" name="txtRank" xy="569,60" size="64,61" group="n4_r9ri" font="ui://eg2y0ldpwonotja" fontSize="46" color="#cf7e78" text="666"/>
+    <group id="n4_r9ri" name="n4" xy="329,60" size="304,61" advanced="true">
+      <relation target="" sidePair="center-center"/>
+    </group>
+    <image id="n9_r9ri" name="n9" src="si5ztig" fileName="imgnew/tc_xiant.png" pkg="eg2y0ldp" xy="56,136"/>
+    <list id="n0_r9ri" name="list" xy="0,250" size="962,275" layout="row" overflow="hidden" scroll="horizontal" colGap="90" defaultItem="ui://eg2y0ldpj48o98" align="center" autoClearItems="true">
+      <item/>
+      <item/>
+      <item/>
+    </list>
+  </displayList>
+</component>

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

@@ -131,6 +131,7 @@
     <image id="r9ri13b" name="hz_dakai.png" path="/componentsGallery/"/>
     <component id="r9ri13c" name="ComboBox_popup.xml" path="/componentsGallery/"/>
     <component id="r9ri13d" name="ComboBox_item.xml" path="/componentsGallery/"/>
+    <component id="r9ri13e" name="PoemGalleryRewardGetUI.xml" path="/" exported="true"/>
   </resources>
   <publish name="" path="..\GameClient\Assets\ResIn\UI\Poem" packageCount="2" genCode="true"/>
 </packageDescription>

+ 74 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/poem/UI_PoemGalleryRewardGetUI.cs

@@ -0,0 +1,74 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.Poem
+{
+    public partial class UI_PoemGalleryRewardGetUI
+    {
+        public GComponent target;
+        public GTextField m_txtRank;
+        public GList m_list;
+        public const string URL = "ui://iyz778gkr9ri13e";
+        public const string PACKAGE_NAME = "Poem";
+        public const string RES_NAME = "PoemGalleryRewardGetUI";
+        private static UI_PoemGalleryRewardGetUI _proxy;
+
+        public static UI_PoemGalleryRewardGetUI Create(GObject gObject = null)
+        {
+            var ui = new UI_PoemGalleryRewardGetUI();
+            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_PoemGalleryRewardGetUI Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_PoemGalleryRewardGetUI();
+            }
+            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_txtRank = (GTextField)comp.GetChild("txtRank");
+            m_list = (GList)comp.GetChild("list");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_txtRank = null;
+            m_list = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/poem/UI_PoemGalleryRewardGetUI.cs.meta

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

+ 98 - 0
GameClient/Assets/Game/HotUpdate/Views/Poem/PoemGalleryRewardGetView.cs

@@ -0,0 +1,98 @@
+using System.Collections.Generic;
+using ET;
+using FairyGUI;
+using UI.CommonGame;
+using UI.Poem;
+using UnityEngine;
+
+namespace GFGGame
+{
+    public class PoemGalleryRewardGetView : BaseWindow
+    {
+        private UI_PoemGalleryRewardGetUI _ui;
+        private List<ItemData> _rewardDatas = new List<ItemData>();
+        public override void Dispose()
+        {
+            if (_ui != null)
+            {
+                _ui.Dispose();
+                _ui = null;
+            }
+            base.Dispose();
+        }
+
+        protected override void OnInit()
+        {
+            base.OnInit();
+            packageName = UI_PoemGalleryRewardGetUI.PACKAGE_NAME;
+            _ui = UI_PoemGalleryRewardGetUI.Create();
+            this.viewCom = _ui.target;
+            this.viewCom.Center();
+            this.modal = true;
+            viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;
+
+            _ui.m_list.itemRenderer = RenderListItem;
+        }
+        protected override void AddEventListener()
+        {
+            base.AddEventListener();
+
+        }
+        protected override void OnShown()
+        {
+            base.OnShown();
+            ViewManager.SetMaskAlpha(0.8f);
+            int rank = (int)this.viewData;
+            _ui.m_txtRank.text = rank.ToString();
+
+            GalleryRewardCfg[] rewardCfgs = GalleryRewardCfgArray.Instance.dataArray;
+
+            for (int i = 0; i < rewardCfgs.Length; i++)
+            {
+                if (i == rewardCfgs.Length - 1)
+                {
+                    _rewardDatas = ItemUtil.CreateItemDataList(rewardCfgs[i].itemsArr);
+                }
+                else
+                {
+                    GalleryRewardCfg curCfg = rewardCfgs[i];
+                    GalleryRewardCfg nextCfg = rewardCfgs[i + 1];
+                    if (rank >= curCfg.rank && rank < nextCfg.rank)
+                    {
+                        _rewardDatas = ItemUtil.CreateItemDataList(rewardCfgs[i].itemsArr);
+                        break;
+                    }
+                }
+            }
+            _ui.m_list.numItems = _rewardDatas.Count;
+
+        }
+
+        protected override void OnHide()
+        {
+            base.OnHide();
+            ViewManager.SetMaskAlpha(0.6f);
+        }
+
+        protected override void RemoveEventListener()
+        {
+            base.RemoveEventListener();
+
+        }
+
+        private void RenderListItem(int index, GObject obj)
+        {
+            UI_ComItem item = UI_ComItem.Proxy(obj);
+            ItemData reward = _rewardDatas[index];
+            if (obj.data == null)
+            {
+                obj.data = new ItemView(obj as GComponent);
+            }
+            (obj.data as ItemView).SetData(reward);
+            // (obj.data as ItemView).SetComItemScale = 0.72f;
+            // (obj.data as ItemView).SetTxtCountScale = 0.8f;
+            // (obj.data as ItemView).SetTxtCountPos(185, 155);
+            UI_ComItem.ClearProxy();
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Views/Poem/PoemGalleryRewardGetView.cs.meta

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

BIN
GameClient/Assets/ResIn/UI/Poem/Poem_fui.bytes