public ValueKeybind(bool initialValue, string identifier, string displayName, KeyBind.BindTypes bindType = KeyBind.BindTypes.HoldActive) { Identifier = identifier; DisplayName = displayName; InitialValue = initialValue; BindType = bindType; EnumMenuStyle = EnumMenuStyle.KeyBind; }
public ValueKeybind(bool initialValue, string identifier, string displayName, KeyBind.BindTypes bindType = KeyBind.BindTypes.HoldActive, Char key = '\0', bool separatorBefore = false) { Identifier = identifier; DisplayName = displayName; InitialValue = initialValue; BindType = bindType; EnumMenuStyle = EnumMenuStyle.KeyBind; Key = key; SeparatorBefore = separatorBefore; }
/// <summary> /// Generates a KeyBind to a specified Menu object. /// </summary> public static void AddKeyBind(this Menu sender, string uniqueIdentifier, string displayName, bool defaultValue, KeyBind.BindTypes bindTypes, char default1, char default2) { if (sender == null) { throw new ArgumentNullException("sender"); } sender.Add(uniqueIdentifier, new KeyBind(displayName, defaultValue, bindTypes, default1, default2)); }
public static void CreateKeyBind(this Menu m, string displayName, string uniqueId, uint defaultKey1, uint defaultKey2, KeyBind.BindTypes bindtype = KeyBind.BindTypes.PressToggle, bool defaultValue = true) { try { m.Add(uniqueId, new KeyBind(displayName, defaultValue, bindtype, defaultKey1, defaultKey2)); } catch (Exception) { Console.ForegroundColor = ConsoleColor.Yellow; Console.Write("Error creating the checkbox with the uniqueID = "); Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine(uniqueId); Console.ResetColor(); } }
internal static void AddKey(this Menu mainMenu, string name, string disableName, KeyBind.BindTypes keyBindType, uint defaultKey1 = 27, bool isEnabled = false) { mainMenu.Add(name, new KeyBind(disableName, isEnabled, keyBindType, defaultKey1)); }
public static void AddKeybind(this Menu m, String uniq, String display, bool def = false, KeyBind.BindTypes key = KeyBind.BindTypes.HoldActive, uint keyy = 32) { m.Add(uniq, new KeyBind(display, def, key, keyy)); }
public static void AddKeyBind(this Menu menu, string name, string displayname, uint key, KeyBind.BindTypes type) { menu.Add(name, new KeyBind(displayname, false, type, key)); }
/// <summary> /// Creates a KeyBind. /// </summary> public static KeyBind CreateKeyBind(this Menu m, string id, string name, bool defaultvalue, KeyBind.BindTypes BindType, uint key1 = 27U, uint key2 = 27U) { return(m.Add(id, new KeyBind(name, defaultvalue, BindType, key1, key2))); }
public static void CreateKeyBind(this Menu menu, string displayName, string uniqueIdentifer, uint defaultKey1 = 'U', uint defaultKey2 = 'I', KeyBind.BindTypes bindType = KeyBind.BindTypes.PressToggle, bool defaultValue = true) { try { menu.Add(uniqueIdentifer, new KeyBind(displayName, defaultValue, bindType, defaultKey1, defaultKey2)); } catch (Exception e) { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("Error creating KeyBind uniqueIdentifer = {0}", uniqueIdentifer); Console.ForegroundColor = ConsoleColor.DarkRed; Console.WriteLine("{0} Exception caught.", e); Console.ResetColor(); } }
/// <summary> /// Creates a KeyBind. /// </summary> public static KeyBind CreateKeyBind(this Menu m, string id, string name, bool defaultvalue, KeyBind.BindTypes BindType, uint key1 = 27U, uint key2 = 27U) { try { return(m.Add(id, new KeyBind(name, defaultvalue, BindType, key1, key2))); } catch (Exception) { Logger.Error("KappAIO: Failed to create keybind Name: {0} | MenuID: {1}", id, m.DisplayName); return(null); } }
public static void AddKeyBind(this Menu menu, string uniqueID, string displayName, bool defaultValue, KeyBind.BindTypes type, char defKey) { menu.Add(uniqueID, new KeyBind(displayName, defaultValue, type, defKey)); }
public static void AddKeyBind(EloBuddy.SDK.Menu.Menu menu, string displayName, string name, char key, KeyBind.BindTypes type) { menu.Add(name, new KeyBind(displayName, false, type, key)); }
public static void AddKeyBind(Menu m, string display, string unique, uint key, KeyBind.BindTypes k, bool def = false) { m.Add(unique, new KeyBind(display, def, k, key)); }
public DynamicKeyBind(ConfigValue key, string displayName, bool defaultValue, KeyBind.BindTypes type, uint defaultKey1 = 27, uint defaultKey2 = 27) { _configKey = key; KeyBind = new KeyBind(displayName, defaultValue, type, defaultKey1, defaultKey2); Properties.SetValue(_configKey, KeyBind.CurrentValue); KeyBind.OnValueChange += KeyBind_OnValueChange; }
public static KeyBind AddKeybind(ref Menu menu, string text, KeyBind.BindTypes bindType, uint key1, uint key2, bool defaultValue = false) { return(menu.Add(menu.UniqueMenuId + text, new KeyBind(text, defaultValue, bindType, key1, key2))); }
public static KeyBind CreateKeyBind(this Menu m, string id, string name, bool defaultvalue, KeyBind.BindTypes bindType, uint defaultvalue1 = 27U) { return(m.Add(id, new KeyBind(name, defaultvalue, bindType, defaultvalue1))); }
public static void NewKeybind(this Menu menu, string identifier, string displayName, bool defaultValue, KeyBind.BindTypes bindType, char key, bool separatorBefore = false) { if (separatorBefore) { menu.AddSeparator(); } menu.Add(identifier, new KeyBind(displayName, defaultValue, bindType, key)); Menus[menu.Parent.DisplayName][menu.DisplayName][menu].Add(identifier, Values.KeyBind); }