using System.Collections.Generic; using RGB.NET.Core; namespace RGB.NET.Devices.CoolerMaster; /// /// /// Represents a CoolerMaster mouse. /// public sealed class CoolerMasterMouseRGBDevice : CoolerMasterRGBDevice, IMouse { #region Constructors /// /// /// Initializes a new instance of the class. /// /// The specific information provided by CoolerMaster for the mouse /// The update trigger used to update this device. internal CoolerMasterMouseRGBDevice(CoolerMasterMouseRGBDeviceInfo info, IDeviceUpdateTrigger updateTrigger) : base(info, updateTrigger) { InitializeLayout(); } #endregion #region Methods private void InitializeLayout() { Dictionary mapping = CoolerMasterMouseLedMappings.Mapping[DeviceInfo.DeviceIndex]; foreach (KeyValuePair led in mapping) AddLed(led.Key, new Point(led.Value.column * 19, led.Value.row * 19), new Size(19, 19)); } /// protected override object GetLedCustomData(LedId ledId) => CoolerMasterMouseLedMappings.Mapping[DeviceInfo.DeviceIndex][ledId]; #endregion }