Added Editor Menu options for the NonDrawing Graphic

--HG--
branch : develop_5.3
release
Simon Jackson 2017-01-08 13:31:47 +00:00
parent ce5939113f
commit c76135b55a
1 changed files with 20 additions and 0 deletions

View File

@ -1690,6 +1690,26 @@ namespace UnityEditor.UI
}
#endregion
#region Non Drawing Graphic options
[MenuItem("GameObject/UI/Extensions/NonDrawingGraphicClickable", false)]
static public void AddNonDrawingGraphic(MenuCommand menuCommand)
{
GameObject go = CreateUIElementRoot("NonDrawing Graphic", menuCommand, s_ImageGUIElementSize);
go.AddComponent<NonDrawingGraphic>();
Selection.activeGameObject = go;
}
[MenuItem("GameObject/UI/Extensions/NonDrawingGraphic", false)]
static public void AddClickableNonDrawingGraphic(MenuCommand menuCommand)
{
GameObject go = CreateUIElementRoot("NonDrawing Graphic-Clickable", menuCommand, s_ImageGUIElementSize);
go.AddComponent<NonDrawingGraphic>();
go.AddComponent<UISelectableExtension>();
Selection.activeGameObject = go;
}
#endregion
#endregion
#region Helper Functions