using Colore; using Colore.Data; using Colore.Effects.Keyboard; using System; namespace ChromaController { internal class EffectRegion { public Key[] Keys { get; private set; } public Color Color { get; private set; } public EffectRegion(Key[] keys, Color color) { Keys = keys; Color = color; } public EffectRegion(Key keys, Color color) { Keys = new Key[] { keys }; Color = color; } internal void Show(IChroma chroma) { Array.ForEach(Keys, x => chroma.Keyboard.SetKeyAsync(x, Color, false)); } internal void AddToGrid(KeyboardCustom keyboardGrid) { Array.ForEach(Keys, x => keyboardGrid[x] = Color); } } }