[opt] 优化下载更新界面的显示

This commit is contained in:
chengshengfei
2024-05-28 15:56:05 +08:00
parent 7914660f8c
commit c84c21574d
3 changed files with 56 additions and 41 deletions

View File

@@ -5,11 +5,11 @@ using Version = TEngine.Version;
namespace GameMain
{
[Window(UILayer.UI, fromResources: true, location: "AssetLoad/UILoadUpdate",fullScreen:true)]
[Window(UILayer.UI, fromResources: true, location: "AssetLoad/UILoadUpdate", fullScreen: true)]
public class UILoadUpdate : UIWindow
{
private Scrollbar m_scrollbarProgress;
#region
private Image m_imgBackGround;
private Text m_textDesc;
@@ -41,12 +41,16 @@ namespace GameMain
protected override void RegisterEvent()
{
base.RegisterEvent();
AddUIEvent(RuntimeId.ToRuntimeId("RefreshVersion"),RefreshVersion);
AddUIEvent(RuntimeId.ToRuntimeId("RefreshVersion"), RefreshVersion);
}
protected override void OnRefresh()
{
base.OnRefresh();
if (base.userDatas.Length > 0 && base.userDatas[0] != null)
{
m_textDesc.text = base.userDatas[0].ToString(); //获取更新内容由ProcedureDownloadFile -> OnDownloadProgressCallback 传递
}
}
#region