Skip to content

Commit

Permalink
feat(tracks): add glow on text
Browse files Browse the repository at this point in the history
  • Loading branch information
domi7777 committed Dec 23, 2024
1 parent adc1646 commit df13679
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/scenes/LoopTracksScene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,7 @@ export class LoopTracksScene extends Phaser.Scene {
const trackScene = this.getTrackScene(index);
const sceneTextColor = trackScene?.sceneTextColor.color ?? EmptyScene.sceneTextColor.color;
const trackColor = track.selected ? sceneTextColor : PhaserColors.darkGrey.color;
track.button.clearFX();
if (track.selected) {
track.button.postFX.addGlow(trackColor, 1, 3)
}

track.button
.setDepth(track.selected ? 0 : -1)
.setFillStyle(PhaserColors.black.color)
Expand All @@ -247,6 +244,13 @@ export class LoopTracksScene extends Phaser.Scene {
.setColor(colorToHex(trackScene?.sceneTextColor ?? EmptyScene.sceneTextColor))
.setAlpha(track.selected ? 1 : 0.5);

track.button.clearFX();
track.buttonText.clearFX();
track.buttonText.postFX.addGlow(trackColor, 1, 0);
if (track.selected) {
track.button.postFX.addGlow(trackColor, 0, 3);
}

const hasLoopControls = trackScene?.canRecord || trackScene?.canPlay;
if (hasLoopControls) {
if (trackScene?.canRecord && track.selected && (track.loop.isRecording() || track.loop.isReadyToRecord())) {
Expand Down

0 comments on commit df13679

Please sign in to comment.