/// <summary> /// Initializes a new instance of the <see cref="RectangleKeyGroup"/> class. /// </summary> /// <param name="keyboard">The keyboard this keygroup belongs to.</param> /// <param name="fromKey">They first key to calculate the rectangle of this keygroup from.</param> /// <param name="toKey">They second key to calculate the rectangle of this keygroup from.</param> /// <param name="minOverlayPercentage">(optional) The minimal percentage overlay a key must have with the <see cref="Rectangle" /> to be taken into the keygroup. (default: 0.5f)</param> /// <param name="autoAttach">(optional) Specifies whether this group should be automatically attached or not. (default: true)</param> public RectangleKeyGroup(CorsairKeyboard keyboard, CorsairKey fromKey, CorsairKey toKey, float minOverlayPercentage = 0.5f, bool autoAttach = true) : this(keyboard, RectangleHelper.CreateRectangleFromRectangles(fromKey.KeyRectangle, toKey.KeyRectangle), minOverlayPercentage, autoAttach) { }
public bool ContainsKey(CorsairKey key) { return key != null && GroupKeys.Contains(key); }