Skip to content

Commit

Permalink
Dimly light inactive FX select buttons
Browse files Browse the repository at this point in the history
This is the original S3 behavior and it's probably less confusing.
  • Loading branch information
robbert-vdh committed Feb 5, 2023
1 parent bd24a2d commit 68e6252
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions res/controllers/Traktor-Kontrol-S3-hid-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -2521,12 +2521,12 @@ TraktorS3.VanillaFxControl = class {
}

const lightButton = function(fxNumber) {
// By default the LED is off
let ledColor = 0;
if (activeFxSelectButtons.has(fxNumber)) {
ledColor = this.fxColors[fxNumber] + TraktorS3.LEDBrightValue;
} else if (this.pressedFxSelectButtons.indexOf(fxNumber) !== -1) {
ledColor = this.fxColors[fxNumber] + TraktorS3.LEDDimValue;
// By default the LED is dimly lit
let ledColor = this.fxColors[fxNumber];
if (activeFxSelectButtons.has(fxNumber) || this.pressedFxSelectButtons.indexOf(fxNumber) !== -1) {
ledColor += TraktorS3.LEDBrightValue;
} else {
ledColor += TraktorS3.LEDDimValue;
}

this.controller.hid.setOutput("[ChannelX]", `!fxButton${fxNumber}`, ledColor, !this.controller.batchingOutputs);
Expand Down

0 comments on commit 68e6252

Please sign in to comment.