74 lines
1.8 KiB
C#
74 lines
1.8 KiB
C#
#if UNITY_EDITOR
|
|
|
|
using Sirenix.OdinInspector;
|
|
using Sirenix.OdinInspector.Editor;
|
|
using System;
|
|
using UnityEngine;
|
|
|
|
namespace UguiToolkit.Editor.Windows
|
|
{
|
|
public class EditWindow : BaseWindow<EditWindow>
|
|
{
|
|
/// <summary>
|
|
/// 当是否显示预览实例发生改变时
|
|
/// </summary>
|
|
public event Action<bool> showHierarchyOfEntityChanged;
|
|
|
|
/// <summary>
|
|
/// 背景显示发生改变
|
|
/// </summary>
|
|
public event Action<bool> showBackgroundChanged;
|
|
|
|
/// <summary>
|
|
/// 创建所有TextEntity
|
|
/// </summary>
|
|
public event Action createAllTextEntity;
|
|
|
|
|
|
[SerializeField, HideInInspector]
|
|
private bool m_showHierarchyOfEntityChange = false;
|
|
|
|
[SerializeField, HideInInspector]
|
|
private bool m_showBackground = true;
|
|
|
|
[LabelText("Hierarchy是否显示"), ShowInInspector]
|
|
private bool ShowHierarchyOfEntity
|
|
{
|
|
get => m_showHierarchyOfEntityChange;
|
|
set
|
|
{
|
|
m_showHierarchyOfEntityChange = value;
|
|
showHierarchyOfEntityChanged?.Invoke(m_showHierarchyOfEntityChange);
|
|
}
|
|
}
|
|
|
|
[LabelText("背景是否显示"), ShowInInspector]
|
|
private bool ShowBackground
|
|
{
|
|
get => m_showBackground;
|
|
set
|
|
{
|
|
m_showBackground = value;
|
|
showBackgroundChanged?.Invoke(m_showBackground);
|
|
}
|
|
}
|
|
|
|
[Button("创建所有Text")]
|
|
private void CreateAllTextEntity()
|
|
{
|
|
createAllTextEntity?.Invoke();
|
|
}
|
|
|
|
public override string GettitleContent()
|
|
{
|
|
return "助手编辑界面";
|
|
}
|
|
|
|
public override void Init(WindowArgs args = null)
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
#endif |