mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Fixed STRAFE lighting for Dota
This commit is contained in:
parent
c924d5120a
commit
d0da0f96fe
@ -5,7 +5,9 @@ using Artemis.Utilities;
|
|||||||
using CUE.NET;
|
using CUE.NET;
|
||||||
using CUE.NET.Brushes;
|
using CUE.NET.Brushes;
|
||||||
using CUE.NET.Devices.Generic.Enums;
|
using CUE.NET.Devices.Generic.Enums;
|
||||||
|
using CUE.NET.Devices.Headset;
|
||||||
using CUE.NET.Devices.Keyboard;
|
using CUE.NET.Devices.Keyboard;
|
||||||
|
using CUE.NET.Devices.Mouse;
|
||||||
using CUE.NET.Exceptions;
|
using CUE.NET.Exceptions;
|
||||||
|
|
||||||
namespace Artemis.KeyboardProviders.Corsair
|
namespace Artemis.KeyboardProviders.Corsair
|
||||||
@ -13,7 +15,7 @@ namespace Artemis.KeyboardProviders.Corsair
|
|||||||
internal class CorsairRGB : KeyboardProvider
|
internal class CorsairRGB : KeyboardProvider
|
||||||
{
|
{
|
||||||
private CorsairKeyboard _keyboard;
|
private CorsairKeyboard _keyboard;
|
||||||
|
private CorsairMouse _mouse;
|
||||||
public CorsairRGB()
|
public CorsairRGB()
|
||||||
{
|
{
|
||||||
Name = "Corsair RGB Keyboards";
|
Name = "Corsair RGB Keyboards";
|
||||||
@ -68,11 +70,12 @@ namespace Artemis.KeyboardProviders.Corsair
|
|||||||
/*CUE is already initialized*/
|
/*CUE is already initialized*/
|
||||||
}
|
}
|
||||||
_keyboard = CueSDK.KeyboardSDK;
|
_keyboard = CueSDK.KeyboardSDK;
|
||||||
|
_mouse = CueSDK.MouseSDK;
|
||||||
switch (_keyboard.DeviceInfo.Model)
|
switch (_keyboard.DeviceInfo.Model)
|
||||||
{
|
{
|
||||||
case "K95 RGB":
|
case "K95 RGB":
|
||||||
Height = 7;
|
Height = 7;
|
||||||
Width = 24;
|
Width = 25;
|
||||||
KeyboardRegions.Add(new KeyboardRegion("TopRow", new Point(0, 1), new Point(20, 1)));
|
KeyboardRegions.Add(new KeyboardRegion("TopRow", new Point(0, 1), new Point(20, 1)));
|
||||||
KeyboardRegions.Add(new KeyboardRegion("NumPad", new Point(21, 2), new Point(25, 7)));
|
KeyboardRegions.Add(new KeyboardRegion("NumPad", new Point(21, 2), new Point(25, 7)));
|
||||||
KeyboardRegions.Add(new KeyboardRegion("QWER", new Point(5, 3), new Point(8, 3)));
|
KeyboardRegions.Add(new KeyboardRegion("QWER", new Point(5, 3), new Point(8, 3)));
|
||||||
@ -80,22 +83,22 @@ namespace Artemis.KeyboardProviders.Corsair
|
|||||||
case "K70 RGB":
|
case "K70 RGB":
|
||||||
Height = 7;
|
Height = 7;
|
||||||
Width = 21;
|
Width = 21;
|
||||||
KeyboardRegions.Add(new KeyboardRegion("TopRow", new Point(0, 1), new Point(16, 1)));
|
KeyboardRegions.Add(new KeyboardRegion("TopRow", new Point(0, 1), new Point(18, 1)));
|
||||||
KeyboardRegions.Add(new KeyboardRegion("NumPad", new Point(17, 2), new Point(21, 7)));
|
KeyboardRegions.Add(new KeyboardRegion("NumPad", new Point(17, 2), new Point(21, 7)));
|
||||||
KeyboardRegions.Add(new KeyboardRegion("QWER", new Point(2, 3), new Point(5, 3)));
|
KeyboardRegions.Add(new KeyboardRegion("QWER", new Point(2, 3), new Point(5, 3)));
|
||||||
break;
|
break;
|
||||||
case "K65 RGB":
|
case "K65 RGB":
|
||||||
Height = 7;
|
Height = 7;
|
||||||
Width = 18;
|
Width = 18;
|
||||||
KeyboardRegions.Add(new KeyboardRegion("TopRow", new Point(0, 1), new Point(16, 1)));
|
KeyboardRegions.Add(new KeyboardRegion("TopRow", new Point(0, 1), new Point(18, 1)));
|
||||||
KeyboardRegions.Add(new KeyboardRegion("NumPad", new Point(17, 2), new Point(20, 7)));
|
KeyboardRegions.Add(new KeyboardRegion("NumPad", new Point(17, 2), new Point(20, 7)));
|
||||||
KeyboardRegions.Add(new KeyboardRegion("QWER", new Point(2, 3), new Point(5, 3)));
|
KeyboardRegions.Add(new KeyboardRegion("QWER", new Point(2, 3), new Point(5, 3)));
|
||||||
break;
|
break;
|
||||||
case "STRAFE RGB":
|
case "STRAFE RGB":
|
||||||
Height = 7;
|
Height = 6;
|
||||||
KeyboardRegions.Add(new KeyboardRegion("TopRow", new Point(0, 1), new Point(16, 1)));
|
KeyboardRegions.Add(new KeyboardRegion("TopRow", new Point(0, 1), new Point(18, 1)));
|
||||||
KeyboardRegions.Add(new KeyboardRegion("NumPad", new Point(17, 2), new Point(21, 7)));
|
KeyboardRegions.Add(new KeyboardRegion("NumPad", new Point(18, 2), new Point(22, 7)));
|
||||||
KeyboardRegions.Add(new KeyboardRegion("QWER", new Point(2, 3), new Point(5, 3)));
|
KeyboardRegions.Add(new KeyboardRegion("QWER", new Point(1, 3), new Point(4, 3)));
|
||||||
Width = 22;
|
Width = 22;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -120,13 +123,19 @@ namespace Artemis.KeyboardProviders.Corsair
|
|||||||
g.DrawImage(bitmap, 0,0);
|
g.DrawImage(bitmap, 0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var fixedImage = ImageUtilities.ResizeImage(fixedBmp, Width, Height);
|
||||||
var brush = new ImageBrush
|
var brush = new ImageBrush
|
||||||
{
|
{
|
||||||
Image = ImageUtilities.ResizeImage(fixedBmp, Width, Height)
|
Image = fixedImage
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var i = 0;
|
||||||
|
foreach (var region in _mouse.Leds)
|
||||||
|
region.Color = fixedImage.GetPixel(3, i++);
|
||||||
|
|
||||||
_keyboard.Brush = brush;
|
_keyboard.Brush = brush;
|
||||||
_keyboard.Update();
|
_keyboard.Update();
|
||||||
|
_mouse.Update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -132,6 +132,28 @@
|
|||||||
public bool ultimate { get; set; }
|
public bool ultimate { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class Ability4
|
||||||
|
{
|
||||||
|
public string name { get; set; }
|
||||||
|
public int level { get; set; }
|
||||||
|
public bool can_cast { get; set; }
|
||||||
|
public bool passive { get; set; }
|
||||||
|
public bool ability_active { get; set; }
|
||||||
|
public int cooldown { get; set; }
|
||||||
|
public bool ultimate { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Ability5
|
||||||
|
{
|
||||||
|
public string name { get; set; }
|
||||||
|
public int level { get; set; }
|
||||||
|
public bool can_cast { get; set; }
|
||||||
|
public bool passive { get; set; }
|
||||||
|
public bool ability_active { get; set; }
|
||||||
|
public int cooldown { get; set; }
|
||||||
|
public bool ultimate { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class Attributes
|
public class Attributes
|
||||||
{
|
{
|
||||||
public int level { get; set; }
|
public int level { get; set; }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user