Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
CorsairMouse.cs
Go to the documentation of this file.
2
4
6{
7 private CorsairMouse(Fragment fragment, CorsairLedPosition[] leds, DeviceColorProfile colorProfile)
8 : base(RgbDeviceType.Mouse, fragment, leds, colorProfile)
9 {
10 base.PreferredLevelOfDetail = EffectDetailLevel.Low;
11 }
12
13 public static CorsairMouse Create(int deviceIndex, CorsairDeviceInfo deviceInfo, DeviceColorProfile colorProfile)
14 {
15 //IL_0177: Unknown result type (might be due to invalid IL or missing references)
16 CorsairLedPosition[] array = deviceInfo.PhysicalLayout switch
17 {
18 CorsairPhysicalLayout.CPL_Zones1 => new CorsairLedPosition[1]
19 {
21 {
22 LedId = CorsairLedId.CLM_1
23 }
24 },
25 CorsairPhysicalLayout.CPL_Zones2 => new CorsairLedPosition[2]
26 {
28 {
29 LedId = CorsairLedId.CLM_1
30 },
32 {
33 LedId = CorsairLedId.CLM_2
34 }
35 },
36 CorsairPhysicalLayout.CPL_Zones3 => new CorsairLedPosition[3]
37 {
39 {
40 LedId = CorsairLedId.CLM_1
41 },
43 {
44 LedId = CorsairLedId.CLM_2
45 },
47 {
48 LedId = CorsairLedId.CLM_3
49 }
50 },
51 CorsairPhysicalLayout.CPL_Zones4 => new CorsairLedPosition[4]
52 {
54 {
55 LedId = CorsairLedId.CLM_1
56 },
58 {
59 LedId = CorsairLedId.CLM_2
60 },
62 {
63 LedId = CorsairLedId.CLM_3
64 },
66 {
67 LedId = CorsairLedId.CLM_4
68 }
69 },
70 _ => new CorsairLedPosition[0],
71 };
72 return new CorsairMouse(Fragment.FromGrid(new Rectangle(27, 0, 1, array.Length)), array, colorProfile);
73 }
74}
static CorsairMouse Create(int deviceIndex, CorsairDeviceInfo deviceInfo, DeviceColorProfile colorProfile)
CorsairMouse(Fragment fragment, CorsairLedPosition[] leds, DeviceColorProfile colorProfile)
static Fragment FromGrid(Rectangle grid)
Definition Fragment.cs:38