mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-12 21:38:38 +00:00
Added BlackWidow keyboard regions (they might be misaligned though)
This commit is contained in:
parent
bdeba5e5b6
commit
cf38247fc6
@ -1,9 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using Artemis.KeyboardProviders.Razer.Utilities;
|
||||
using Corale.Colore.Core;
|
||||
using Corale.Colore.Razer.Keyboard;
|
||||
using Corale.Colore.Razer;
|
||||
using ColoreColor = Corale.Colore.Core.Color;
|
||||
using Constants = Corale.Colore.Razer.Keyboard.Constants;
|
||||
using KeyboardCustom = Corale.Colore.Razer.Keyboard.Effects.Custom;
|
||||
|
||||
namespace Artemis.KeyboardProviders.Razer
|
||||
@ -16,6 +17,13 @@ namespace Artemis.KeyboardProviders.Razer
|
||||
CantEnableText = "Couldn't connect to your Razer BlackWidow Chroma.\n " +
|
||||
"Please check your cables and try updating Razer Synapse.\n\n " +
|
||||
"If needed, you can select a different keyboard in Artemis under settings.";
|
||||
|
||||
KeyboardRegions = new List<KeyboardRegion>
|
||||
{
|
||||
new KeyboardRegion("TopRow", new Point(0, 0), new Point(19, 0)),
|
||||
new KeyboardRegion("NumPad", new Point(20, 1), new Point(23, 6)),
|
||||
new KeyboardRegion("QWER", new Point(2, 2), new Point(5, 2))
|
||||
};
|
||||
}
|
||||
|
||||
public override bool CanEnable()
|
||||
@ -24,9 +32,9 @@ namespace Artemis.KeyboardProviders.Razer
|
||||
return false;
|
||||
|
||||
// Some people have Synapse installed, but not a Chroma keyboard, deal with this
|
||||
var blackWidowFound = Chroma.Instance.Query(Corale.Colore.Razer.Devices.Blackwidow).Connected;
|
||||
var blackWidowTeFound = Chroma.Instance.Query(Corale.Colore.Razer.Devices.BlackwidowTe).Connected;
|
||||
return (blackWidowFound || blackWidowTeFound);
|
||||
var blackWidowFound = Chroma.Instance.Query(Devices.Blackwidow).Connected;
|
||||
var blackWidowTeFound = Chroma.Instance.Query(Devices.BlackwidowTe).Connected;
|
||||
return blackWidowFound || blackWidowTeFound;
|
||||
}
|
||||
|
||||
public override void Enable()
|
||||
@ -34,10 +42,6 @@ namespace Artemis.KeyboardProviders.Razer
|
||||
Chroma.Instance.Initialize();
|
||||
Height = Constants.MaxRows;
|
||||
Width = Constants.MaxColumns;
|
||||
|
||||
KeyboardRegions.Add(new KeyboardRegion("TopRow", new Point(0, 0), new Point(19, 0)));
|
||||
KeyboardRegions.Add(new KeyboardRegion("NumPad", new Point(20, 1), new Point(23, 6)));
|
||||
KeyboardRegions.Add(new KeyboardRegion("QWER", new Point(2, 2), new Point(5, 2)));
|
||||
}
|
||||
|
||||
public override void Disable()
|
||||
@ -48,7 +52,7 @@ namespace Artemis.KeyboardProviders.Razer
|
||||
public override void DrawBitmap(Bitmap bitmap)
|
||||
{
|
||||
var razerArray = RazerUtilities.BitmapColorArray(bitmap, Height, Width);
|
||||
|
||||
|
||||
Chroma.Instance.Keyboard.SetCustom(razerArray);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user