// ReSharper disable MemberCanBePrivate.Global // ReSharper disable UnusedMember.Global using RGB.NET.Core; using RGB.NET.Devices.Razer.Native; namespace RGB.NET.Devices.Razer { /// /// /// Represents a razer keypad. /// public class RazerKeypadRGBDevice : RazerRGBDevice, IKeypad { #region Constructors /// /// /// Initializes a new instance of the class. /// /// The specific information provided by CUE for the keypad. internal RazerKeypadRGBDevice(RazerRGBDeviceInfo info, IDeviceUpdateTrigger updateTrigger) : base(info, new RazerKeypadUpdateQueue(updateTrigger)) { InitializeLayout(); } #endregion #region Methods private void InitializeLayout() { for (int i = 0; i < _Defines.KEYPAD_MAX_ROW; i++) for (int j = 0; j < _Defines.KEYPAD_MAX_COLUMN; j++) AddLed(LedId.Keypad1 + ((i * _Defines.KEYPAD_MAX_COLUMN) + j), new Point(j * 20, i * 20), new Size(19, 19)); } /// protected override object? GetLedCustomData(LedId ledId) => (int)ledId - (int)LedId.Keypad1; #endregion } }