移除UIElement代码绑定工具,为后续AutoBind代码绑定工具做准备

移除UIElement代码绑定工具,为后续AutoBind代码绑定工具做准备
This commit is contained in:
ALEXTANG
2023-10-27 00:13:04 +08:00
parent b1c7f30be9
commit 7401edac15
9 changed files with 13 additions and 355 deletions

View File

@@ -20,26 +20,22 @@ namespace GameMain
public MessageShowType ShowType = MessageShowType.None;
#region
private Button m_btnPackage;
private Text m_textTittle;
private Text m_textInfo;
private Button m_btnIgnore;
private Button m_btnUpdate;
public override void ScriptGenerator()
{
CheckUIElement();
m_btnPackage = FChild<Button>("m_btnPackage");
m_textTittle = FChild<Text>("m_textTittle");
m_textInfo = FChild<Text>("m_textInfo");
m_btnIgnore = FChild<Button>("m_btnIgnore");
m_btnUpdate = FChild<Button>("m_btnUpdate");
m_btnPackage = FindChildComponent<Button>("BgImage/m_btnPackage");
m_textTittle = FindChildComponent<Text>("BgImage/m_textTittle");
m_textInfo = FindChildComponent<Text>("BgImage/m_textInfo");
m_btnIgnore = FindChildComponent<Button>("BgImage/Group/m_btnIgnore");
m_btnUpdate = FindChildComponent<Button>("BgImage/Group/m_btnUpdate");
m_btnPackage.onClick.AddListener(OnClickPackageBtn);
m_btnIgnore.onClick.AddListener(OnClickIgnoreBtn);
m_btnUpdate.onClick.AddListener(OnClickUpdateBtn);
}
#endregion
#region

View File

@@ -8,22 +8,21 @@ namespace GameMain
[Window(UILayer.UI, fromResources: true, location: "AssetLoad/UILoadUpdate",fullScreen:true)]
public class UILoadUpdate : UIWindow
{
private Scrollbar m_scrollbarProgress;
#region
private Image m_imgBackGround;
private Scrollbar m_scrollbarProgress;
private Text m_textDesc;
private Button m_btnClear;
private Text m_textAppid;
private Text m_textResid;
public override void ScriptGenerator()
{
CheckUIElement();
m_imgBackGround = FChild<Image>("m_imgBackGround");
m_scrollbarProgress = FChild<Scrollbar>("m_scrollbarProgress");
m_textDesc = FChild<Text>("m_textDesc");
m_btnClear = FChild<Button>("m_btnClear");
m_textAppid = FChild<Text>("m_textAppid");
m_textResid = FChild<Text>("m_textResid");
m_imgBackGround = FindChildComponent<Image>("m_imgBackGround");
m_textDesc = FindChildComponent<Text>("m_textDesc");
m_btnClear = FindChildComponent<Button>("TopNode/m_btnClear");
m_textAppid = FindChildComponent<Text>("TopNode/m_textAppid");
m_textResid = FindChildComponent<Text>("TopNode/m_textResid");
m_btnClear.onClick.AddListener(OnClickClearBtn);
}
#endregion
@@ -31,6 +30,7 @@ namespace GameMain
public override void OnCreate()
{
base.OnCreate();
m_scrollbarProgress = FindChildComponent<Scrollbar>("m_scrollbarProgress");
LoadUpdateLogic.Instance.DownloadCompleteAction += DownLoad_Complete_Action;
LoadUpdateLogic.Instance.DownProgressAction += DownLoad_Progress_Action;
LoadUpdateLogic.Instance.UnpackedCompleteAction += Unpacked_Complete_Action;