When a Focus command changes either the palette, or the theme, call
`LEDControl.refreshAll()` to repaint the LEDs. This way we don't have to force a
repaint some other way, and changes take effect immediately, as they should.
Fixes#8.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
Migrate from the older `Focus` API to `onFocusEvent` provided by Kaleidoscope.
As a side-effect, this drops the per-layer focus command support, as that was a
workaround for a Chrysalis bug fixed since.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
While the original plugin was written independently, significant developments
were made while working for Keyboard.io. As such, I feel it is appropriate to
assign copyright to the company.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
Supporting transparency is very, very expensive in terms of speed, while the
benefits are marginal at best. Drop support for it for now.
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
The `updateHandler` method was looking up colors starting at `theme_base`,
instead of `map_base`. The former is the first theme in our set, the last is the
one we should be working with.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Added `lookupColor(index)`, which looks up a color in the palette, by index.
Made the `row, col` variant public, and added an `updateColor` method.
These are there to help porting FingerPainter.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
This should - in theory - allow other plugins to just use `LEDPaletteTheme`,
without having many copies of the palette.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>