public static void DisplayCustomMenu(Rect position, GUIContent[] options, int selected, SelectMenuItemFunction callback, object userData) { int[] numArray = new int[] { selected }; string[] strArray = new string[options.Length]; for (int i = 0; i < options.Length; i++) { strArray[i] = options[i].text; } DisplayCustomMenu(position, strArray, numArray, callback, userData); }
internal static void DisplayCustomMenuWithSeparators(Rect position, string[] options, bool[] separator, int[] selected, SelectMenuItemFunction callback, object userData) { Vector2 vector = GUIUtility.GUIToScreenPoint(new Vector2(position.x, position.y)); position.x = vector.x; position.y = vector.y; int[] enabled = new int[options.Length]; int[] numArray2 = new int[options.Length]; for (int i = 0; i < options.Length; i++) { enabled[i] = 1; numArray2[i] = 0; } Internal_DisplayCustomMenu(position, options, enabled, numArray2, selected, callback, userData); ResetMouseDown(); }
internal static void DisplayCustomMenuWithSeparators(Rect position, string[] options, bool[] enabled, bool[] separator, int[] selected, SelectMenuItemFunction callback, object userData, bool showHotkey, bool allowDisplayNames) { Vector2 temp = GUIUtility.GUIToScreenPoint(new Vector2(position.x, position.y)); position.x = temp.x; position.y = temp.y; Internal_DisplayCustomMenu(position, options, enabled, separator, selected, callback, userData, showHotkey, allowDisplayNames); ResetMouseDown(); }
private static void Internal_DisplayCustomMenu(Rect screenPosition, string[] options, int[] enabled, int[] separator, int[] selected, SelectMenuItemFunction callback, object userData, bool showHotkey) { Private_DisplayCustomMenu(screenPosition, options, enabled, separator, selected, callback, userData, showHotkey); }
internal static void DisplayCustomMenu(Rect position, string[] options, int[] selected, SelectMenuItemFunction callback, object userData, bool showHotkey) { bool[] separator = new bool[options.Length]; DisplayCustomMenuWithSeparators(position, options, separator, selected, callback, userData, showHotkey); }
internal static void DisplayCustomMenu(Rect position, string[] options, bool[] enabled, int[] selected, SelectMenuItemFunction callback, object userData) { DisplayCustomMenu(position, options, enabled, selected, callback, userData, false); }
internal static void DisplayCustomMenuWithSeparators(Rect position, string[] options, bool[] enabled, bool[] separator, int[] selected, SelectMenuItemFunction callback, object userData) { DisplayCustomMenuWithSeparators(position, options, enabled, separator, selected, callback, userData, false); }
public static void DisplayCustomMenu(Rect position, GUIContent[] options, int selected, SelectMenuItemFunction callback, object userData, bool showHotkey) { DisplayCustomMenu(position, options, null, selected, callback, userData, showHotkey); }
public static void DisplayCustomMenu(Rect position, GUIContent[] options, int selected, SelectMenuItemFunction callback, object userData, bool showHotkey) { int[] numArray = new int[] { selected }; string[] strArray = new string[options.Length]; for (int i = 0; i < options.Length; i++) { strArray[i] = options[i].text; } DisplayCustomMenu(position, strArray, numArray, callback, userData, showHotkey); }
internal static void DisplayCustomMenu(Rect position, string[] options, bool[] enabled, int[] selected, SelectMenuItemFunction callback, object userData, bool showHotkey) { bool[] separator = new bool[options.Length]; DisplayCustomMenuWithSeparators(position, options, enabled, separator, selected, callback, userData, showHotkey); }
public static void DisplayCustomMenu(Rect position, GUIContent[] options, int selected, SelectMenuItemFunction callback, object userData) { DisplayCustomMenu(position, options, selected, callback, userData, false); }
internal static void DisplayCustomMenu(Rect position, string[] options, int[] selected, SelectMenuItemFunction callback, object userData) { DisplayCustomMenu(position, options, selected, callback, userData, false); }
private extern static void INTERNAL_CALL_Private_DisplayCustomMenu(ref Rect screenPosition, string[] options, int[] enabled, int[] separator, int[] selected, SelectMenuItemFunction callback, object userData, bool showHotkey);
private static extern void DisplayCustomContextPopupMenu(Rect screenPosition, string[] options, bool[] enabled, bool[] separator, int[] selected, SelectMenuItemFunction callback, object userData, bool showHotkey, bool allowDisplayNames);
internal static void DisplayCustomMenuWithSeparators(Rect position, string[] options, bool[] enabled, bool[] separator, int[] selected, SelectMenuItemFunction callback, object userData, bool showHotkey) { Vector2 vector = GUIUtility.GUIToScreenPoint(new Vector2(position.x, position.y)); position.x = vector.x; position.y = vector.y; int[] numArray = new int[options.Length]; int[] numArray2 = new int[options.Length]; for (int i = 0; i < options.Length; i++) { numArray[i] = !enabled[i] ? 0 : 1; numArray2[i] = !separator[i] ? 0 : 1; } Internal_DisplayCustomMenu(position, options, numArray, numArray2, selected, callback, userData, showHotkey); ResetMouseDown(); }
internal static extern void DisplayObjectContextPopupMenuWithExtraItems(Rect position, Object[] context, int contextUserData, string[] options, bool[] enabled, bool[] separator, int[] selected, SelectMenuItemFunction callback, object userData, bool showHotkey);
private static void Private_DisplayCustomMenu(Rect screenPosition, string[] options, int[] enabled, int[] separator, int[] selected, SelectMenuItemFunction callback, object userData, bool showHotkey) { INTERNAL_CALL_Private_DisplayCustomMenu(ref screenPosition, options, enabled, separator, selected, callback, userData, showHotkey); }
public static void DisplayCustomMenu(Rect position, GUIContent[] options, Func <int, bool> checkEnabled, int selected, SelectMenuItemFunction callback, object userData, bool showHotkey = false) { int[] selectedArray = { selected }; string[] strings = new string[options.Length]; for (int i = 0; i < options.Length; i++) { strings[i] = options[i].text; } bool[] enabled; if (checkEnabled != null) { enabled = new bool[strings.Length]; for (int i = 0; i < strings.Length; i++) { enabled[i] = checkEnabled(i); } } else { enabled = Enumerable.Repeat(true, options.Length).ToArray(); } DisplayCustomMenu(position, strings, enabled, selectedArray, callback, userData, showHotkey); }
internal static void DisplayCustomMenuWithSeparators(Rect position, string[] options, bool[] separator, int[] selected, SelectMenuItemFunction callback, object userData, bool showHotkey) { Vector2 temp = GUIUtility.GUIToScreenPoint(new Vector2(position.x, position.y)); position.x = temp.x; position.y = temp.y; bool[] enabled = Enumerable.Repeat(true, options.Length).ToArray(); Internal_DisplayCustomMenu(position, options, enabled, separator, selected, callback, userData, showHotkey); ResetMouseDown(); }
public static void DisplayCustomMenu(Rect position, GUIContent[] options, int selected, SelectMenuItemFunction callback, object userData, bool showHotkey) { int[] selectedArray = { selected }; string[] strings = new string[options.Length]; for (int i = 0; i < options.Length; i++) { strings[i] = options[i].text; } DisplayCustomMenu(position, strings, selectedArray, callback, userData, showHotkey); }
internal static void DisplayCustomMenuWithSeparators(Rect position, string[] options, bool[] enabled, bool[] separator, int[] selected, SelectMenuItemFunction callback, object userData, bool showHotkey) { DisplayCustomMenuWithSeparators(position, options, enabled, separator, selected, callback, userData, showHotkey, false); }
private static void Internal_DisplayCustomMenu(Rect screenPosition, string[] options, int[] enabled, int[] separator, int[] selected, SelectMenuItemFunction callback, object userData) { INTERNAL_CALL_Internal_DisplayCustomMenu(ref screenPosition, options, enabled, separator, selected, callback, userData); }
private static void Internal_DisplayCustomMenu(Rect screenPosition, string[] options, bool[] enabled, bool[] separator, int[] selected, SelectMenuItemFunction callback, object userData, bool showHotkey, bool allowDisplayNames = false) { DisplayCustomContextPopupMenu(screenPosition, options, enabled, separator, selected, callback, userData, showHotkey, allowDisplayNames); }
internal static void DisplayCustomMenuWithSeparators(Rect position, string[] options, bool[] enabled, bool[] separator, int[] selected, SelectMenuItemFunction callback, object userData, bool showHotkey) { Vector2 temp = GUIUtility.GUIToScreenPoint(new Vector2(position.x, position.y)); position.x = temp.x; position.y = temp.y; int[] ienabled = new int[options.Length]; int[] iseparator = new int[options.Length]; for (int i = 0; i < options.Length; i++) { ienabled[i] = enabled[i] ? 1 : 0; iseparator[i] = separator[i] ? 1 : 0; } Internal_DisplayCustomMenu(position, options, ienabled, iseparator, selected, callback, userData, showHotkey); ResetMouseDown(); }