提交项目
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using BingoBrain.Core;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class FaqUICtrl : BaseCtrl
|
||||
{
|
||||
public static FaqUICtrl Instance { get; private set; }
|
||||
|
||||
private FaqUIModel model;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
//model = ModuleManager.Instance..GetModel(ModelConst.FaqUIModel) as FaqUIModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a2069f62112e4c4c93bf70218716b9a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,23 @@
|
||||
using BingoBrain.Core;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class FaqUIModel : BaseModel
|
||||
{
|
||||
#region 生命周期
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnReset()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bff19c78bca1d4838a7ebd8a7aebe0dd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,128 @@
|
||||
using System.Collections.Generic;
|
||||
using BingoBrain.Core;
|
||||
using BingoBrain.HotFix;
|
||||
using FairyGUI;
|
||||
using FGUI.ACommon;
|
||||
using FGUI.JMain;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class FaqUIUI : BaseUI
|
||||
{
|
||||
private FaqUIUICtrl ctrl;
|
||||
private FaqUIModel model;
|
||||
private FGUI.JMain.com_faq ui;
|
||||
private int seleindex = 1;
|
||||
private List<string> config_name_list;
|
||||
private List<string> config_money_list;
|
||||
private List<string> old_timelist;
|
||||
private List<string> new_timelist;
|
||||
public FaqUIUI(FaqUIUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.FaqUIUI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "JMain";
|
||||
uiInfo.assetName = "com_faq";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.FaqUIModel) as FaqUIModel;
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
Hall.Instance.UpdateSecondEvent -= scroll;
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as FGUI.JMain.com_faq;
|
||||
}
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
InitView();
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDisplay(object args)
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
//初始化页面逻辑
|
||||
private void InitView()
|
||||
{
|
||||
exBrPoolModel.getFaqData();
|
||||
config_name_list = exBrPoolModel.config_name_list;
|
||||
config_money_list = exBrPoolModel.config_money_list;
|
||||
old_timelist = exBrPoolModel.old_time_list;
|
||||
new_timelist = exBrPoolModel.new_time_list;
|
||||
ui.btn_close.SetClick(() =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(SkinInfo.FaqUIUI_Close);
|
||||
});
|
||||
ui.list_.SetVirtualAndLoop();
|
||||
ui.list_.itemRenderer = RendererList;
|
||||
ui.list_.numItems = 35;
|
||||
|
||||
Hall.Instance.UpdateSecondEvent += scroll;
|
||||
}
|
||||
void scroll()
|
||||
{
|
||||
if (seleindex > 30)
|
||||
{
|
||||
seleindex = 0;
|
||||
ui.list_.ScrollToView(seleindex, false);
|
||||
ui.list_.ScrollToView_UseAnim(1, true, 1);
|
||||
seleindex = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.list_.ScrollToView_UseAnim(seleindex, true, 1);
|
||||
seleindex++;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void RendererList(int index, GObject obj)
|
||||
{
|
||||
var a = obj as com_list_main;
|
||||
a.name_.text = config_name_list[index % 30];
|
||||
a.money.text = "$" + config_money_list[index % 30];
|
||||
a.time1.text = old_timelist[index % 30];
|
||||
a.time2.text = new_timelist[index % 30];
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 044d9b725bee54d0c8e85a3cba1814ea
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,74 @@
|
||||
using BingoBrain.Core;
|
||||
using BingoBrain.HotFix;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class FaqUIUICtrl : BaseUICtrl
|
||||
{
|
||||
private FaqUIUI ui;
|
||||
private FaqUIModel model;
|
||||
|
||||
private uint openUIMsg = SkinInfo.FaqUIUI_Open;
|
||||
private uint closeUIMsg = SkinInfo.FaqUIUI_Close;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.FaqUIModel) as FaqUIModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OpenUI(object args = null)
|
||||
{
|
||||
if (ui == null)
|
||||
{
|
||||
ui = new FaqUIUI(this);
|
||||
ui.Open(args);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CloseUI(object args = null)
|
||||
{
|
||||
if (ui != null && !ui.isClose)
|
||||
{
|
||||
ui.Close();
|
||||
}
|
||||
ui = null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
public override uint GetOpenUIMsg(string uiName)
|
||||
{
|
||||
return openUIMsg;
|
||||
}
|
||||
public override uint GetCloseUIMsg(string uiName)
|
||||
{
|
||||
return closeUIMsg;
|
||||
}
|
||||
|
||||
protected override void AddListener()
|
||||
{
|
||||
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
|
||||
}
|
||||
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1f82e3b8179e54408b935b9516da10f5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user