增加GridLayout网格布局组件

This commit is contained in:
monitor1394
2023-08-29 18:30:11 +08:00
parent e0f6b8c2dc
commit e4fbe5670f
31 changed files with 399 additions and 51 deletions

View File

@@ -9,6 +9,8 @@ namespace XCharts.Editor
public override void OnInspectorGUI()
{
++EditorGUI.indentLevel;
PropertyField("m_LayoutIndex");
PropertyField("m_Left");
PropertyField("m_Right");
PropertyField("m_Top");

View File

@@ -0,0 +1,22 @@
using UnityEditor;
using XCharts.Runtime;
namespace XCharts.Editor
{
[ComponentEditor(typeof(GridLayout))]
public class GridLayoutEditor : MainComponentEditor<GridLayout>
{
public override void OnInspectorGUI()
{
++EditorGUI.indentLevel;
PropertyField("m_Left");
PropertyField("m_Right");
PropertyField("m_Top");
PropertyField("m_Bottom");
PropertyField("m_Row");
PropertyField("m_Column");
PropertyField("m_Spacing");
--EditorGUI.indentLevel;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 97c3db8110ca44c3bb088f8af9c56aa6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: