UIModule
This commit is contained in:
ALEXTANG
2023-04-04 11:51:33 +08:00
parent 41a0243d91
commit 9b041b2dc7
8 changed files with 13 additions and 13 deletions

View File

@@ -2,8 +2,8 @@
namespace TEngine.Editor.Inspector
{
[CustomEditor(typeof(UIComponent))]
internal sealed class UIComponentInspector : GameFrameworkInspector
[CustomEditor(typeof(UIModule))]
internal sealed class UIModuleInspector : GameFrameworkInspector
{
private SerializedProperty m_InstanceRoot = null;
private SerializedProperty m_UICamera = null;
@@ -18,7 +18,7 @@ namespace TEngine.Editor.Inspector
serializedObject.Update();
UIComponent t = (UIComponent)target;
UIModule t = (UIModule)target;
EditorGUI.BeginDisabledGroup(EditorApplication.isPlayingOrWillChangePlaymode);
{

View File

@@ -3,7 +3,7 @@ using UnityEngine;
namespace TEngine
{
public sealed partial class UIComponent : GameFrameworkComponent
public sealed partial class UIModule : GameFrameworkComponent
{
[Serializable]
private sealed class UIGroup

View File

@@ -16,10 +16,10 @@ namespace TEngine
}
/// <summary>
/// UI组件
/// UI模块
/// </summary>
[DisallowMultipleComponent]
public sealed partial class UIComponent : GameFrameworkComponent
public sealed partial class UIModule : GameFrameworkComponent
{
private const int DefaultPriority = 0;

View File

@@ -175,7 +175,7 @@ namespace TEngine
for (var index = 0; index < listCanvas.Length; index++)
{
var childCanvas = listCanvas[index];
childCanvas.sortingOrder = parentCanvas.sortingOrder + childCanvas.sortingOrder % UIComponent.WINDOW_DEEP;
childCanvas.sortingOrder = parentCanvas.sortingOrder + childCanvas.sortingOrder % UIModule.WINDOW_DEEP;
}
}
#endregion

View File

@@ -139,7 +139,7 @@ namespace TEngine
{
if (_canvas != null)
{
return _canvas.gameObject.layer == UIComponent.WINDOW_SHOW_LAYER;
return _canvas.gameObject.layer == UIModule.WINDOW_SHOW_LAYER;
}
else
{
@@ -151,7 +151,7 @@ namespace TEngine
{
if (_canvas != null)
{
int setLayer = value ? UIComponent.WINDOW_SHOW_LAYER : UIComponent.WINDOW_HIDE_LAYER;
int setLayer = value ? UIModule.WINDOW_SHOW_LAYER : UIModule.WINDOW_HIDE_LAYER;
if (_canvas.gameObject.layer == setLayer)
return;
@@ -361,7 +361,7 @@ namespace TEngine
}
// 实例化对象
_panel = handle.InstantiateSync(UIComponent.UIRootStatic);
_panel = handle.InstantiateSync(UIModule.UIRootStatic);
_panel.transform.localPosition = Vector3.zero;
// 获取组件

View File

@@ -40,9 +40,9 @@ public class GameModule:MonoBehaviour
public static SettingComponent Setting { get; private set; }
/// <summary>
/// 获取界面组件
/// 获取UI模块
/// </summary>
public static UIComponent UI { get; private set; }
public static UIModule UI { get; private set; }
#endregion
@@ -57,7 +57,7 @@ public class GameModule:MonoBehaviour
ObjectPool = Get<ObjectPoolComponent>();
Resource = Get<ResourceComponent>();
Setting = Get<SettingComponent>();
UI = Get<UIComponent>();
UI = Get<UIModule>();
}
public static void InitCustomComponents()