private RebindDialog() : base(false, true) { stopwatch = new Stopwatch(); menu = new RebindHud(HudMain.HighDpiRoot) { Visible = false }; blacklist = new List <int> { BindManager.GetControl("escape").Index, }; SharedBinds.Escape.NewPressed += Exit; }
/// <summary> /// Returns or modifies the group member associated with the given enum. /// </summary> private object GetOrSetMember(object data, int memberEnum) { switch ((BindClientAccessors)memberEnum) { case BindClientAccessors.GetOrCreateGroup: return(GetOrCreateGroup(data as string)?.Index ?? -1); case BindClientAccessors.GetBindGroup: return(GetBindGroup(data as string)?.Index ?? -1); case BindClientAccessors.GetComboIndices: return(BindManager.GetComboIndices(data as IReadOnlyList <string>)); case BindClientAccessors.GetControlByName: return(BindManager.GetControl(data as string)?.Index ?? -1); case BindClientAccessors.ClearBindGroups: ClearBindGroups(); break; case BindClientAccessors.Unload: Unload(); break; case BindClientAccessors.RequestBlacklistMode: { if (data != null) { RequestBlacklistMode = (SeBlacklistModes)data; break; } else { return(RequestBlacklistMode); } } } return(null); }
public ControlData(RichHudControls key) { index = BindManager.GetControl(key).Index; }
public ControlData(MyKeys key) { index = BindManager.GetControl(key).Index; }
/// <summary> /// Retrieves the control with the given name /// </summary> public IControl GetControl(string name) => BindManager.GetControl(name);