public override void ShowGUI(Menu menu) { string apiPrefix = "(AC.PlayerMenus.GetElementWithName (\"" + menu.title + "\", \"" + title + "\") as AC.MenuGraphic)"; MenuSource source = menu.menuSource; EditorGUILayout.BeginVertical("Button"); if (source != MenuSource.AdventureCreator) { uiImageType = (UIImageType)EditorGUILayout.EnumPopup("UI image type:", uiImageType); if (uiImageType == UIImageType.Image) { uiImage = LinkedUiGUI <Image> (uiImage, "Linked Image:", source); } else if (uiImageType == UIImageType.RawImage) { uiRawImage = LinkedUiGUI <RawImage> (uiRawImage, "Linked Raw Image:", source); } EditorGUILayout.EndVertical(); EditorGUILayout.BeginVertical("Button"); } graphicType = (AC_GraphicType)CustomGUILayout.EnumPopup("Graphic type:", graphicType, apiPrefix + ".graphicType"); if (graphicType == AC_GraphicType.Normal) { graphic.ShowGUI(false, false, "Texture:", CursorRendering.Software, apiPrefix + ".graphic"); } EditorGUILayout.EndVertical(); base.ShowGUI(menu); }
public void CopyGraphic(MenuGraphic _element) { uiImage = _element.uiImage; graphicType = _element.graphicType; graphic = _element.graphic; base.Copy (_element); }
public void CopyGraphic(MenuGraphic _element) { uiImage = _element.uiImage; graphicType = _element.graphicType; graphic = _element.graphic; base.Copy(_element); }
private void CopyGraphic(MenuGraphic _element) { uiImage = _element.uiImage; graphicType = _element.graphicType; graphic = new CursorIconBase(); graphic.Copy(_element.graphic); base.Copy(_element); }
/** * Initialises the element when it is created within MenuManager. */ public override void Declare() { uiImage = null; graphicType = AC_GraphicType.Normal; isVisible = true; isClickable = false; graphic = new CursorIconBase (); numSlots = 1; SetSize (new Vector2 (10f, 5f)); base.Declare (); }
/** * Initialises the element when it is created within MenuManager. */ public override void Declare() { uiImage = null; graphicType = AC_GraphicType.Normal; isVisible = true; isClickable = false; graphic = new CursorIconBase(); numSlots = 1; SetSize(new Vector2(10f, 5f)); base.Declare(); }
private void CopyGraphic(MenuGraphic _element, bool ignoreUnityUI) { if (ignoreUnityUI) { uiImage = null; } else { uiImage = _element.uiImage; } uiRawImage = _element.uiRawImage; uiImageType = _element.uiImageType; graphicType = _element.graphicType; graphic = new CursorIconBase(); graphic.Copy(_element.graphic); base.Copy(_element); }
public override void ShowGUI(MenuSource source) { EditorGUILayout.BeginVertical("Button"); if (source != MenuSource.AdventureCreator) { uiImage = LinkedUiGUI <Image> (uiImage, "Linked Image:", source); EditorGUILayout.EndVertical(); EditorGUILayout.BeginVertical("Button"); } graphicType = (AC_GraphicType)EditorGUILayout.EnumPopup("Graphic type:", graphicType); if (graphicType == AC_GraphicType.Normal) { graphic.ShowGUI(false); } EditorGUILayout.EndVertical(); base.ShowGUI(source); }
public override void ShowGUI(MenuSource source) { EditorGUILayout.BeginVertical ("Button"); if (source != MenuSource.AdventureCreator) { uiImage = LinkedUiGUI <Image> (uiImage, "Linked Image:", source); EditorGUILayout.EndVertical (); EditorGUILayout.BeginVertical ("Button"); } graphicType = (AC_GraphicType) EditorGUILayout.EnumPopup ("Graphic type:", graphicType); if (graphicType == AC_GraphicType.Normal) { graphic.ShowGUI (false); } EditorGUILayout.EndVertical (); base.ShowGUI (source); }
private void CopyGraphic(MenuGraphic _element) { uiImage = _element.uiImage; graphicType = _element.graphicType; graphic = new CursorIconBase (); graphic.Copy (_element.graphic); base.Copy (_element); }