Update "Set brightness" action (#28)
This commit is contained in:
parent
9c27320ed8
commit
91e1a6bfe4
6 changed files with 8 additions and 2 deletions
Binary file not shown.
|
After Width: | Height: | Size: 224 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 224 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 14 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 14 KiB |
|
|
@ -1,4 +1,4 @@
|
|||
import streamDeck, { action, DidReceiveSettingsEvent, WillAppearEvent, KeyDownEvent, SingletonAction } from "@elgato/streamdeck";
|
||||
import streamDeck, { action, DidReceiveSettingsEvent, WillAppearEvent, KeyDownEvent, PropertyInspectorDidAppearEvent, SingletonAction } from "@elgato/streamdeck";
|
||||
|
||||
@action({ UUID: "org.igox.busylight.brigthness.set" })
|
||||
export class SetBrightness extends SingletonAction<BrightnessSettings> {
|
||||
|
|
@ -27,6 +27,12 @@ export class SetBrightness extends SingletonAction<BrightnessSettings> {
|
|||
await ev.action.setSettings(settings);
|
||||
await ev.action.setTitle(`${settings.brightness}%`);
|
||||
}
|
||||
|
||||
override async onPropertyInspectorDidAppear(ev: PropertyInspectorDidAppearEvent<BrightnessSettings>): Promise<void> {
|
||||
streamDeck.logger.debug(`>>> Received onPropertyInspectorDidAppear. Setting action icon <<<`);
|
||||
|
||||
await ev.action.setImage(`imgs/actions/buttons/brigthness/brigthness.png`);
|
||||
}
|
||||
}
|
||||
|
||||
async function setBrightness(brightness: number) {
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue