mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
UIModule
UIModule
This commit is contained in:
@@ -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);
|
||||
{
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
||||
// 获取组件
|
||||
|
@@ -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()
|
||||
|
Reference in New Issue
Block a user