예제 #1
0
 /// <summary>
 /// Adds a new item to the menu.
 /// </summary>
 /// <param name="path">Path that determines where to add the element. See class information on how to specify paths.
 ///                    All sub-elements of a path will be added automatically.</param>
 /// <param name="callback">Callback to trigger when the path element is selected.</param>
 /// <param name="shortcut">Keyboard shortcut to display next to the item name.</param>
 /// <param name="name">Localized name for the menu item.</param>
 public void AddItem(string path, Action callback, ShortcutKey shortcut, LocString name)
 {
     Internal_AddItem(mCachedPtr, path, callbacks.Count, ref shortcut);
     callbacks.Add(callback);
 }
예제 #2
0
 /// <summary>
 /// Adds a new item to the menu.
 /// </summary>
 /// <param name="path">Path that determines where to add the element. See class information on how to specify paths.
 ///                    All sub-elements of a path will be added automatically.</param>
 /// <param name="callback">Callback to trigger when the path element is selected.</param>
 /// <param name="shortcut">Keyboard shortcut to display next to the item name.</param>
 /// <param name="name">Localized name for the menu item.</param>
 public void AddItem(string path, Action callback, ShortcutKey shortcut, LocString name)
 {
     Internal_AddItem(mCachedPtr, path, callbacks.Count, ref shortcut);
     callbacks.Add(callback);
 }
예제 #3
0
 private static extern void Internal_AddItem(IntPtr instance, string path, int callbackIdx, ref ShortcutKey shortcut);
예제 #4
0
 private static extern void Internal_AddItem(IntPtr instance, string path, int callbackIdx, ref ShortcutKey shortcut);