Skip to content

Commit

Permalink
[增加]1. 增加文档注释
Browse files Browse the repository at this point in the history
  • Loading branch information
AlianBlank committed Feb 5, 2025
1 parent 3b4400e commit b799c78
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
33 changes: 32 additions & 1 deletion Runtime/UI/OpenUIFormInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

namespace GameFrameX.UI.Runtime
{
/// <summary>
/// 打开界面的信息。
/// </summary>
public sealed class OpenUIFormInfo : IReference
{
private int m_SerialId = 0;
Expand All @@ -14,38 +17,63 @@ public sealed class OpenUIFormInfo : IReference
private bool m_IsFullScreen = false;

/// <summary>
/// 是否全屏
/// 获取界面是否全屏。
/// </summary>
public bool IsFullScreen
{
get { return m_IsFullScreen; }
}

/// <summary>
/// 获取界面类型。
/// </summary>
public Type FormType
{
get { return m_FormType; }
}

/// <summary>
/// 获取界面序列编号。
/// </summary>
public int SerialId
{
get { return m_SerialId; }
}

/// <summary>
/// 获取界面所属的界面组。
/// </summary>
public UIGroup UIGroup
{
get { return m_UIGroup; }
}

/// <summary>
/// 获取是否暂停被覆盖的界面。
/// </summary>
public bool PauseCoveredUIForm
{
get { return m_PauseCoveredUIForm; }
}

/// <summary>
/// 获取用户自定义数据。
/// </summary>
public object UserData
{
get { return m_UserData; }
}

/// <summary>
/// 创建打开界面的信息。
/// </summary>
/// <param name="serialId">界面序列编号。</param>
/// <param name="uiGroup">界面所属的界面组。</param>
/// <param name="uiFormType">界面类型。</param>
/// <param name="pauseCoveredUIForm">是否暂停被覆盖的界面。</param>
/// <param name="userData">用户自定义数据。</param>
/// <param name="isFullScreen">界面是否全屏。</param>
/// <returns>创建的打开界面的信息。</returns>
public static OpenUIFormInfo Create(int serialId, UIGroup uiGroup, Type uiFormType, bool pauseCoveredUIForm, object userData, bool isFullScreen)
{
OpenUIFormInfo openUIFormInfo = ReferencePool.Acquire<OpenUIFormInfo>();
Expand All @@ -58,6 +86,9 @@ public static OpenUIFormInfo Create(int serialId, UIGroup uiGroup, Type uiFormTy
return openUIFormInfo;
}

/// <summary>
/// 清理打开界面的信息。
/// </summary>
public void Clear()
{
m_SerialId = 0;
Expand Down
18 changes: 18 additions & 0 deletions Runtime/UI/UIFormInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,38 @@ public sealed class UIFormInfo : IReference
private bool m_Paused = false;
private bool m_Covered = false;

/// <summary>
/// 获取界面。
/// </summary>
public IUIForm UIForm
{
get { return m_UIForm; }
}

/// <summary>
/// 获取或设置界面是否暂停。
/// </summary>
public bool Paused
{
get { return m_Paused; }
set { m_Paused = value; }
}

/// <summary>
/// 获取或设置界面是否被覆盖。
/// </summary>
public bool Covered
{
get { return m_Covered; }
set { m_Covered = value; }
}

/// <summary>
/// 创建界面组界面信息。
/// </summary>
/// <param name="uiForm">界面。</param>
/// <returns>创建的界面组界面信息。</returns>
/// <exception cref="GameFrameworkException">界面为空时抛出。</exception>
public static UIFormInfo Create(IUIForm uiForm)
{
if (uiForm == null)
Expand All @@ -43,6 +58,9 @@ public static UIFormInfo Create(IUIForm uiForm)
return uiFormInfo;
}

/// <summary>
/// 清理界面组界面信息。
/// </summary>
public void Clear()
{
m_UIForm = null;
Expand Down

0 comments on commit b799c78

Please sign in to comment.