Added Editor Menu option for UI Grid Primitive

pull/413/head
Simon Jackson 2017-02-17 16:38:08 +00:00
parent 82585a7cb2
commit 48e162ebde
1 changed files with 11 additions and 3 deletions

View File

@ -1126,11 +1126,19 @@ namespace UnityEditor.UI
go.AddComponent<UIPolygon>(); go.AddComponent<UIPolygon>();
Selection.activeGameObject = go; Selection.activeGameObject = go;
} }
#endregion
#region Re-Orderable Lists [MenuItem("GameObject/UI/Extensions/Primitives/UI Grid Renderer", false)]
static public void AddUIGridRenderer(MenuCommand menuCommand)
{
GameObject go = CreateUIElementRoot("UI GridRenderer", menuCommand, s_ImageGUIElementSize);
go.AddComponent<UIGridRenderer>();
Selection.activeGameObject = go;
}
#endregion
[MenuItem("GameObject/UI/Extensions/Re-orderable Lists/Re-orderable Vertical Scroll Rect", false)] #region Re-Orderable Lists
[MenuItem("GameObject/UI/Extensions/Re-orderable Lists/Re-orderable Vertical Scroll Rect", false)]
static public void AddReorderableScrollRectVertical(MenuCommand menuCommand) static public void AddReorderableScrollRectVertical(MenuCommand menuCommand)
{ {
GameObject reorderableScrollRoot = CreateUIElementRoot("Re-orderable Vertical ScrollRect", menuCommand, s_ThickGUIElementSize); GameObject reorderableScrollRoot = CreateUIElementRoot("Re-orderable Vertical ScrollRect", menuCommand, s_ThickGUIElementSize);