2024-10-25 17:38:57 +08:00
|
|
|
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using Sirenix.Utilities.Editor;
|
|
|
|
|
using UnityEditor;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace Ether
|
|
|
|
|
{
|
2024-10-27 04:03:15 +08:00
|
|
|
|
public class TableEditorWindow : OdinWindowBase<TableEditorWindow>
|
2024-10-25 17:38:57 +08:00
|
|
|
|
{
|
|
|
|
|
[MenuItem("配置/表格配置 %t")]
|
|
|
|
|
private static void OpenWindow()
|
|
|
|
|
{
|
|
|
|
|
var window = GetWindow<TableEditorWindow>();
|
|
|
|
|
window.titleContent = new GUIContent("表格配置");
|
2024-10-27 04:03:15 +08:00
|
|
|
|
TableProvider.ResetCounter();
|
2024-10-25 17:38:57 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-10-27 04:03:15 +08:00
|
|
|
|
protected override void OnInit()
|
2024-10-25 17:38:57 +08:00
|
|
|
|
{
|
2024-10-27 04:03:15 +08:00
|
|
|
|
DrawSearchToolbar = true;
|
|
|
|
|
AddSubWindow<PropItemTableWindow>("道具配置");
|
|
|
|
|
AddSubWindow<PropItemTableWindow>("道具配置/道具列表");
|
2024-10-25 17:38:57 +08:00
|
|
|
|
}
|
2024-10-27 04:03:15 +08:00
|
|
|
|
|
2024-10-25 17:38:57 +08:00
|
|
|
|
protected override void OnBeginDrawEditors()
|
|
|
|
|
{
|
|
|
|
|
var selected = this.MenuTree.Selection.FirstOrDefault();
|
|
|
|
|
var toolbarHeight = this.MenuTree.Config.SearchToolbarHeight;
|
|
|
|
|
|
|
|
|
|
// Draws a toolbar with the name of the currently selected menu item.
|
|
|
|
|
SirenixEditorGUI.BeginHorizontalToolbar(toolbarHeight);
|
|
|
|
|
{
|
|
|
|
|
if (selected != null)
|
|
|
|
|
{
|
|
|
|
|
GUILayout.Label(selected.Name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if (SirenixEditorGUI.ToolbarButton(new GUIContent("Create Item")))
|
|
|
|
|
// {
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
SirenixEditorGUI.EndHorizontalToolbar();
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-10-27 04:03:15 +08:00
|
|
|
|
|
2024-10-25 17:38:57 +08:00
|
|
|
|
}
|