bingo 项目提交
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using BingoBrain.Core;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class MakeupRecordCtrl : BaseCtrl
|
||||
{
|
||||
public static MakeupRecordCtrl Instance { get; private set; }
|
||||
|
||||
private MakeupRecordModel model;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
//model = ModuleManager.Instance..GetModel(ModelConst.MakeupRecordModel) as MakeupRecordModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0b65045affd42415ab8ab3bbdda76236
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,23 @@
|
||||
using BingoBrain.Core;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class MakeupRecordModel : BaseModel
|
||||
{
|
||||
#region 生命周期
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnReset()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d09064f5b33fd46c4ab0176d4d94b807
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,141 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using BingoBrain.Core;
|
||||
using BingoBrain.HotFix;
|
||||
using DG.Tweening;
|
||||
using FairyGUI;
|
||||
using FGUI.ACommon;
|
||||
using FGUI.G007_makeup;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class MakeupRecordUI : BaseUI
|
||||
{
|
||||
private MakeupRecordUICtrl ctrl;
|
||||
private MakeupRecordModel model;
|
||||
private FGUI.G007_makeup.com_record ui;
|
||||
private long userUid;
|
||||
private int curIndex = 0;
|
||||
public int ad_cool_down = 120;
|
||||
public MakeupRecordUI(MakeupRecordUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.MakeupRecordUI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "G007_makeup";
|
||||
uiInfo.assetName = "com_record";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as FGUI.G007_makeup.com_record; ;
|
||||
}
|
||||
|
||||
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 List<MakeupTaskData> makeupdataList = new List<MakeupTaskData>();
|
||||
|
||||
|
||||
private void InitView()
|
||||
{
|
||||
if (Screen.safeArea.y != 0)
|
||||
{//刘海屏
|
||||
ui.group_.y += Screen.safeArea.y;
|
||||
}
|
||||
makeupdataList.Clear();
|
||||
|
||||
foreach (var makeupTaskData in PreferencesMgr.Instance.MakeupTaskHistory)
|
||||
{
|
||||
if (makeupTaskData.status != MakeupTaskStatus.Inline)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
makeupdataList.Add(makeupTaskData);
|
||||
}
|
||||
|
||||
if (makeupdataList.Count == 0)
|
||||
{
|
||||
ui.cont_show.selectedIndex = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.cont_show.selectedIndex = 1;
|
||||
ui.list_record.itemRenderer = ItemRenderer;
|
||||
ui.list_record.numItems = makeupdataList.Count;
|
||||
}
|
||||
|
||||
ui.closeButton.SetClick(CtrlCloseUI);
|
||||
ui.btn_help.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(SkinInfo.RegulationUI_Open); });
|
||||
}
|
||||
|
||||
private void ItemRenderer(int index, GObject gObject)
|
||||
{
|
||||
var data = makeupdataList[index];
|
||||
var item = gObject as com_cord_new;
|
||||
// TextureHelper.GetCardIcon(true, spr => { item.loader_logo.texture = spr; });
|
||||
// item.text_name.SetVar("cur", data.inlineNum.ToString()).SetVar("tol", data.inlineInitNum.ToString())
|
||||
// .FlushVars();
|
||||
item.text_amt.text = "+$" + (int)data.amount;
|
||||
item.email_text.text = PreferencesMgr.Instance.ExchangeAccount;
|
||||
item.number_text.text = data.inlineNum + "/" + data.inlineInitNum;
|
||||
item.time_text.text = DateTimeBoardk.Instance.TimestampToString(data.order_time);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bf41d32681a204da480746eb6b5fb99f
|
||||
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 MakeupRecordUICtrl : BaseUICtrl
|
||||
{
|
||||
private MakeupRecordUI ui;
|
||||
private MakeupRecordModel model;
|
||||
|
||||
private uint openUIMsg = SkinInfo.MakeupRecordUI_Open;
|
||||
private uint closeUIMsg = SkinInfo.MakeupRecordUI_Close;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.MakeupRecordModel) as MakeupRecordModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OpenUI(object args = null)
|
||||
{
|
||||
if (ui == null)
|
||||
{
|
||||
ui = new MakeupRecordUI(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: adcebff8c69334963bf0fa7f9ccb627e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user