// 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 mousepad.
///
public class RazerMousepadRGBDevice : RazerRGBDevice, IMousepad
{
#region Constructors
///
///
/// Initializes a new instance of the class.
///
/// The specific information provided by CUE for the mousepad.
internal RazerMousepadRGBDevice(RazerMousepadRGBDeviceInfo info)
: base(info)
{ }
#endregion
#region Methods
///
protected override void InitializeLayout()
{
string model = DeviceInfo.Model.Replace(" ", string.Empty).ToUpper();
ApplyLayoutFromFile(PathHelper.GetAbsolutePath(this, @"Layouts\Razer\Mousepad", $"{model}.xml"), null);
if (LedMapping.Count == 0)
for (int i = 0; i < _Defines.MOUSEPAD_MAX_LEDS; i++)
InitializeLed(LedId.Mousepad1 + i, new Rectangle(i * 11, 0, 10, 10));
}
///
protected override object CreateLedCustomData(LedId ledId) => (int)ledId - (int)LedId.Mousepad1;
///
protected override RazerUpdateQueue CreateUpdateQueue(IDeviceUpdateTrigger updateTrigger) => new RazerMousepadUpdateQueue(updateTrigger, DeviceInfo.DeviceId);
#endregion
}
}