Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #3
0
 private static extern void Internal_AddItem(IntPtr instance, string path, int callbackIdx, ref ShortcutKey shortcut);
Beispiel #4
0
 private static extern void Internal_AddItem(IntPtr instance, string path, int callbackIdx, ref ShortcutKey shortcut);