mirror of
https://github.com/DarthAffe/CUE.NET.git
synced 2026-11-10 20:46:24 +00:00
Refactored to do everything based on LEDs.
This will adapt the devices and reduces the importance of the "special case keyboard"
This commit is contained in:
1 parent
bfe51add66
commit
5a018d0743
24 files changed
+847
-894
No files matched your search
@@ -2,13 +2,14 @@
|
||||
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||
|
||||
using CUE.NET.Devices.Keyboard.Keys;
|
||||
using CUE.NET.Groups;
|
||||
|
||||
namespace CUE.NET.Effects
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a basic effect targeting an <see cref="IKeyGroup"/>.
|
||||
/// Represents a basic effect targeting an <see cref="ILedGroup"/>.
|
||||
/// </summary>
|
||||
public abstract class AbstractKeyGroupEffect : IEffect<IKeyGroup>
|
||||
public abstract class AbstractKeyGroupEffect : IEffect<ILedGroup>
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
@@ -18,9 +19,9 @@ namespace CUE.NET.Effects
|
||||
public bool IsDone { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="IKeyGroup"/> this effect is targeting.
|
||||
/// Gets the <see cref="ILedGroup"/> this effect is targeting.
|
||||
/// </summary>
|
||||
protected IKeyGroup KeyGroup { get; private set; }
|
||||
protected ILedGroup LedGroup { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -35,19 +36,19 @@ namespace CUE.NET.Effects
|
||||
/// <summary>
|
||||
/// Hook which is called when the effect is attached to a device.
|
||||
/// </summary>
|
||||
/// <param name="target">The <see cref="IKeyGroup"/> this effect is attached to.</param>
|
||||
public virtual void OnAttach(IKeyGroup target)
|
||||
/// <param name="target">The <see cref="ILedGroup"/> this effect is attached to.</param>
|
||||
public virtual void OnAttach(ILedGroup target)
|
||||
{
|
||||
KeyGroup = target;
|
||||
LedGroup = target;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Hook which is called when the effect is detached from a device.
|
||||
/// </summary>
|
||||
/// <param name="target">The <see cref="IKeyGroup"/> this effect is detached from.</param>
|
||||
public virtual void OnDetach(IKeyGroup target)
|
||||
/// <param name="target">The <see cref="ILedGroup"/> this effect is detached from.</param>
|
||||
public virtual void OnDetach(ILedGroup target)
|
||||
{
|
||||
KeyGroup = null;
|
||||
LedGroup = null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in new issue
Block a user