/// <summary> /// Initializes a new instance of the <see cref="MenuKeyBind" /> class. /// </summary> /// <param name="name"> /// The internal name of the component /// </param> /// <param name="displayName"> /// The display name of the component /// </param> /// <param name="key"> /// The Key to bind /// </param> /// <param name="type"> /// Key bind type /// </param> /// <param name="uniqueString"> /// String used in saving settings /// </param> public MenuKeyBind(string name, string displayName, Keys key, KeyBindType type, string uniqueString = "") : base(name, displayName, uniqueString) { this.Key = key; this.Type = type; this.original = key; }
/// <summary> /// Initializes a new instance of the <see cref="KeyBind"/> struct. /// </summary> /// <param name="key">The key.</param> /// <param name="secondaryKey">The secondary key.</param> /// <param name="type">The type.</param> /// <param name="defaultValue">The default value.</param> public KeyBind(uint key, uint secondaryKey, KeyBindType type, bool defaultValue = false) { this.Key = key; this.SecondaryKey = secondaryKey; this.Type = type; this.Active = defaultValue; }
public static LeagueSharp.Common.MenuItem KeyBind(this LeagueSharp.Common.Menu subMenu, string name, string display, Keys key, KeyBindType type = KeyBindType.Press) { return subMenu.AddItem(new LeagueSharp.Common.MenuItem(name, display).SetValue<KeyBind>(new KeyBind((uint)key, type))); }
public static MenuKeyBind KeyBind(Menu subMenu, string name, string display, Keys key, KeyBindType type = KeyBindType.Press) { return subMenu.Add(new MenuKeyBind(name, display, key, type)); }
public static void AddKeyBind(this Menu menu, string name, string displayName, uint key, KeyBindType type = KeyBindType.Press, bool defaultValue = false) { menu.AddItem(new MenuItem(name, displayName).SetValue(new KeyBind(key, type, defaultValue))); }
public ApKeyBind( string _action, Keys _key, KeyBindType _type ) { Action = _action; Key = _key; BindType = _type; }
public static void AddKeyBind(this Menu menu, string path, string text, string key, KeyBindType type) { try { menu.AddItem( new MenuItem("apollo.leblanc." + path, text).SetValue(new KeyBind(key.ToCharArray()[0], type))); } catch (Exception e) { Console.WriteLine(e); } }
public static void CreateMenuKeyBind(string subMenuName, string name, string displayName, char key, KeyBindType keyBindType) { menu.SubMenu(subMenuName).AddItem(new MenuItem(name, displayName).SetValue(new KeyBind(key, keyBindType))); }
/// <summary> /// Initializes a new instance of the <see cref="KeybindComponent"/> class with the specified type. /// </summary> /// <param name="type">The type of keybind.</param> public KeybindComponent(KeyBindType type) { Keybind = type; }
/// <summary> /// Initializes a new instance of the <see cref="KeyBind" /> struct. /// </summary> /// <param name="key"> /// The key. /// </param> /// <param name="type"> /// The type. /// </param> /// <param name="defaultValue"> /// The default value. /// </param> public KeyBind(uint key, KeyBindType type = KeyBindType.Press, bool defaultValue = false) { this.Key = key; this.Active = defaultValue; this.Type = type; }
/// <summary> /// Adds a linked key bind. /// </summary> /// <param name="name">The name.</param> /// <param name="key">The key.</param> /// <param name="type">The type.</param> /// <param name="defaultValue">if set to <c>true</c> [default value].</param> /// <returns>KeyBindLink.</returns> public KeyBindLink AddLinkedKeyBind(string name, uint key, KeyBindType type, bool defaultValue = false) { AddKeyBind(name, key, type, defaultValue); return CreateKeyBindLink(name); }
public static MenuKeyBind GetKeyBind(this Menu Menu, string name, string display, Keys key, KeyBindType type = KeyBindType.Press) { return(Menu.Add(new MenuKeyBind(name, display, key, type))); }
public SubMenu AddKeyBind(string name, uint key, KeyBindType type, bool defaultValue = false) { _subMenu.AddItem(new MenuItem(GetName(name), name).SetValue(new KeyBind(key, type, defaultValue))); return(this); }
public static MenuItem AddItem(Menu SubMenu, string Item, string Display, string Key, KeyBindType Type = KeyBindType.Press, bool State = false) { return(SubMenu.AddItem(new MenuItem("_" + SubMenu.Name + "_" + Item, Display, true).SetValue(new KeyBind(Key.ToCharArray()[0], Type, State)))); }
/// <summary> /// Menu KeyBind Constructor /// </summary> /// <param name="key">The Key to bind</param> /// <param name="type">Key bind type</param> public MenuKeyBind(Keys key, KeyBindType type) { Key = key; Type = type; }
/// <summary> /// Adds a linked key bind. /// </summary> /// <param name="name">The name.</param> /// <param name="key">The key.</param> /// <param name="type">The type.</param> /// <param name="defaultValue">if set to <c>true</c> [default value].</param> /// <returns>KeyBindLink.</returns> public KeyBindLink AddLinkedKeyBind(string name, uint key, KeyBindType type, bool defaultValue = false) { this.AddKeyBind(name, key, type, defaultValue); return(this.CreateKeyBindLink(name)); }
public static MenuKeyBind AddKeyBind(Menu menu, string name, string displayName, System.Windows.Forms.Keys key, KeyBindType type) { return(menu.Add(new MenuKeyBind(name, displayName, key, type))); }
public static MenuItem AddKeyBind(this Menu config, string name, string displayName, uint key, KeyBindType type, bool active = false) { if (config.Items.Any(m => m.Name == name)) { DeBug.Write("创建菜单错误", $"已经包含了名为{name}的菜单!", DebugLevel.Warning); } return(config.AddItem(new MenuItem(name, MultiLanguage._(displayName)).SetValue(new KeyBind(key, type, active)))); }
/// <summary> /// Adds a key bind. /// </summary> /// <param name="name">The name.</param> /// <param name="key">The key.</param> /// <param name="type">The type.</param> /// <param name="defaultValue">if set to <c>true</c> [default value].</param> /// <returns>SubMenu.</returns> public SubMenu AddKeyBind(string name, uint key, KeyBindType type, bool defaultValue = false) { _subMenu.AddItem(new MenuItem(GetName(this, name), name).SetValue(new KeyBind(key, type, defaultValue))); return this; }
public static void AddKeyBind(string key, string title, uint keyCode, KeyBindType type) { KeyLinks.Add(key, _currentSubMenu.AddLinkedKeyBind(title, keyCode, type)); }
public static void CreateMenuKeyBind(string subMenuName, string name, string displayName, char key, KeyBindType keyBindType) { menu.SubMenu(subMenuName).AddItem(new MenuItem(name, displayName).SetValue(new KeyBind(key, keyBindType))); }
/// <summary> /// /// </summary> /// <param name="menu"></param> /// <param name="name"></param> /// <param name="display_name"></param> /// <param name="key"></param> /// <param name="type"></param> public static void AddMenuKeyBind(Menu menu, string name, string display_name, Keys key, KeyBindType type) { menu.Add(new MenuKeyBind(name, display_name, key, type)); }
internal static MenuItem AddKeyBind(this Menu menu, string name, string displayname, uint key, KeyBindType type) { return menu.AddItem(new MenuItem(name, displayname).SetValue(new KeyBind(key, type))); }
public static void AddKeyBind(Menu menu, string displayName, string name, char key, KeyBindType type) { menu.AddItem(new MenuItem(name, displayName).SetValue(new KeyBind(key, type))); }
public static void AddKeyBind(Menu menu, string displayName, string name, char key, KeyBindType type) { menu.AddItem(new MenuItem(name, displayName).SetValue(new KeyBind(key,type))); }
public static void AddMenuKeybind(this EnsoulSharp.SDK.MenuUI.Menu menu, string name, string displayName, Keys key, KeyBindType type) { menu.Add(new MenuKeyBind(name, displayName, key, type)); }
internal static MenuItem AddKeyBind(this Menu menu, string name, string displayname, uint key, KeyBindType type) { return(menu.AddItem(new MenuItem(name, displayname).SetValue(new KeyBind(key, type)))); }
public KeyBindNode(string keyBindID, KeyCode keyboardKeyCode, KeyCode joystickKeyCode, KeyCode mobileKeyCode, string label, KeyBindType keyBindType, bool control = false, bool shift = false) { //Debug.Log("KeyBindNode(" + keyBindID + ")"); this.keyBindID = keyBindID; this.label = label; this.keyBindType = keyBindType; this.controlModifier = control; this.shiftModifier = shift; this.joystickKeyCode = joystickKeyCode; //this.mobileKeyCode = mobileKeyCode; this.KeyboardKeyCode = keyboardKeyCode; }