Esempio n. 1
0
 /// <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;
 }
Esempio n. 2
0
 /// <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;
 }
Esempio n. 3
0
 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)));
 }
Esempio n. 4
0
 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));
 }
Esempio n. 5
0
 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)));
 }
Esempio n. 6
0
 public ApKeyBind(
     string _action,
     Keys _key,
     KeyBindType _type
 )
 {
     Action = _action;
     Key = _key;
     BindType = _type;
 }
Esempio n. 7
0
 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);
     }
 }
Esempio n. 8
0
 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)));
 }
Esempio n. 9
0
 /// <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;
 }
Esempio n. 10
0
 /// <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;
 }
Esempio n. 11
0
 /// <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);
 }
Esempio n. 12
0
 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)));
 }
Esempio n. 13
0
            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);
            }
Esempio n. 14
0
 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))));
 }
Esempio n. 15
0
 /// <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;
 }
Esempio n. 16
0
 /// <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));
 }
Esempio n. 17
0
 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)));
 }
Esempio n. 18
0
 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))));
 }
Esempio n. 19
0
 /// <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;
 }
Esempio n. 20
0
 public static void AddKeyBind(string key, string title, uint keyCode, KeyBindType type)
 {
     KeyLinks.Add(key, _currentSubMenu.AddLinkedKeyBind(title, keyCode, type));
 }
Esempio n. 21
0
 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));
 }
Esempio n. 23
0
 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)));
 }
Esempio n. 24
0
 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)));
 }
Esempio n. 25
0
 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)));
 }
Esempio n. 26
0
 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));
 }
Esempio n. 27
0
 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))));
 }
Esempio n. 28
0
 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;
 }