fix:1、更换项目,使用winter来创建
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
namespace FlowerPower
|
||||
namespace LoveLegend
|
||||
{
|
||||
public class MailViewCtrl : BaseCtrl
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace FlowerPower
|
||||
namespace LoveLegend
|
||||
{
|
||||
public class MailViewModel : BaseModel
|
||||
{
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
// using FGUI.A000_common;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using FairyGUI;
|
||||
using FGUI.P21_MailView;
|
||||
using Spine.Unity;
|
||||
using FGUI.ZM_EMail_20;
|
||||
using UnityEngine;
|
||||
|
||||
namespace FlowerPower
|
||||
namespace LoveLegend
|
||||
{
|
||||
public class MailViewUI : BaseUI
|
||||
{
|
||||
private MailViewUICtrl ctrl;
|
||||
private SignInViewModel model;
|
||||
private SignDailyRewardModel signModel;
|
||||
|
||||
private FGUI.P21_MailView.com_mail ui;
|
||||
private FGUI.ZM_EMail_20.com_mail ui;
|
||||
|
||||
private mail_item items;
|
||||
|
||||
@@ -27,9 +24,9 @@ namespace FlowerPower
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "P21_MailView";
|
||||
uiInfo.packageName = "ZM_EMail_20";
|
||||
uiInfo.assetName = "com_mail";
|
||||
uiInfo.layerType = UILayerType.Normal;
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = false;
|
||||
@@ -44,19 +41,19 @@ namespace FlowerPower
|
||||
protected override void OnClose()
|
||||
{
|
||||
GameHelper.showGameUI = true;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as FGUI.P21_MailView.com_mail;
|
||||
|
||||
ui = baseUI as FGUI.ZM_EMail_20.com_mail;
|
||||
|
||||
}
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
items = (mail_item)UIPackage.CreateObject("P21_MailView", "mail_item");
|
||||
items = (mail_item)UIPackage.CreateObject("ZM_EMail_20", "mail_item");
|
||||
if (Screen.safeArea.y != 0)
|
||||
{
|
||||
ui.com_gold.y += Screen.safeArea.y-15;
|
||||
@@ -68,7 +65,6 @@ namespace FlowerPower
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
{
|
||||
ui.visible = false;
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
@@ -94,18 +90,18 @@ namespace FlowerPower
|
||||
//初始化页面逻辑
|
||||
private void InitView()
|
||||
{
|
||||
|
||||
ui.com_gold.GetChild("text_gold").text = $"{PreferencesMgr.Instance.Currency101:N0}";
|
||||
|
||||
ui.com_gold.GetChild("text_gold").text = $"{DataMgr.Coin.Value:N0}";
|
||||
// items.title.text = "test";
|
||||
// items.text_content.text = "test";
|
||||
var loginModel = GameHelper.GetLoginModel();
|
||||
|
||||
var timestr = loginModel.reg_time;
|
||||
|
||||
var timestr = loginModel.RegTime;
|
||||
DateTimeOffset dateTimeOffset = DateTimeOffset.FromUnixTimeSeconds(timestr);
|
||||
|
||||
items.text_time.text = dateTimeOffset.LocalDateTime.ToString();
|
||||
items.SetClick(()=>{updateitems(items);});
|
||||
|
||||
|
||||
ui.list_mail.AddChild(items);
|
||||
ui.stage.selectedIndex = 1;
|
||||
}
|
||||
@@ -113,47 +109,5 @@ namespace FlowerPower
|
||||
private void updateitems(mail_item ite){
|
||||
ite.status.selectedIndex = ite.status.selectedIndex == 0 ? 1 : 0;
|
||||
}
|
||||
|
||||
public void onShowAnim(object show)
|
||||
{
|
||||
ui.com_gold.GetChild("text_gold").text = $"{PreferencesMgr.Instance.Currency101:N0}";
|
||||
|
||||
if (show != null)
|
||||
{
|
||||
ui.visible = true;
|
||||
|
||||
if ((bool)show)
|
||||
{
|
||||
ui.show1.Play();
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.show2.Play();
|
||||
}
|
||||
isHide = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private bool isHide = true;
|
||||
|
||||
public void onHideAnim(object hide)
|
||||
{
|
||||
if (hide != null && isHide)
|
||||
{
|
||||
if ((bool)hide)
|
||||
{
|
||||
ui.hide1.Play();
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.hide2.Play();
|
||||
}
|
||||
isHide = false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
namespace FlowerPower
|
||||
namespace LoveLegend
|
||||
{
|
||||
public class MailViewUICtrl : BaseUICtrl
|
||||
{
|
||||
@@ -37,30 +37,18 @@ namespace FlowerPower
|
||||
{
|
||||
ui = new MailViewUI(this);
|
||||
ui.Open(args);
|
||||
ui.onShowAnim(args);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.onShowAnim(args);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public override void CloseUI(object args = null)
|
||||
{
|
||||
if (args != null && ui != null)
|
||||
if (ui != null && !ui.isClose)
|
||||
{
|
||||
ui.onHideAnim(args);
|
||||
ui.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ui != null && !ui.isClose)
|
||||
{
|
||||
ui.Close();
|
||||
}
|
||||
|
||||
ui = null;
|
||||
}
|
||||
ui = null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user