mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
UIWidget增加Visible设置
UIWidget增加Visible设置
This commit is contained in:
@@ -52,6 +52,20 @@ namespace TEngine
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 窗口可见性
|
||||
/// </summary>
|
||||
public bool Visible
|
||||
{
|
||||
get => gameObject.activeSelf;
|
||||
|
||||
set
|
||||
{
|
||||
gameObject.SetActive(value);
|
||||
OnSetVisible(value);
|
||||
}
|
||||
}
|
||||
|
||||
internal bool InternalUpdate()
|
||||
{
|
||||
@@ -205,6 +219,13 @@ namespace TEngine
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!gameObject.activeSelf)
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user