Playhead colour in Waveform component
-
Does anyone know if it's possible to change the colour of the playhead in the AudioWaveform component?
-
@paper_lung
By using Look And Feel.drawThumbnailRuler ```Function```
-
@DabDab I tried that but it doesn't work. I'm using the code from the LAF glossary but the playhead doesn't change, even when I change the values in the code. What am I missing?
const var laf = Engine.createGlobalScriptLookAndFeel(); laf.registerFunction("drawTableRuler", function(g, obj) { g.setColour(Colours.withAlpha(obj.bgColour, 0.1)); var x = obj.position * obj.area[2]; g.drawLine(x, x, 0, obj.area[3], 10.0); g.setColour(obj.bgColour); g.drawLine(x, x, 0, obj.area[3], 0.5); });
-
@paper_lung as DabDab says, use "drawThumbnailRuler"
const var laf = Engine.createGlobalScriptLookAndFeel(); laf.registerFunction("drawThumbnailRuler", function(g, obj) { g.setColour(Colours.red); // you can fetch the colour from the component colours as well // g.setColour(obj.itemColour); g.drawVerticalLine(obj.xPosition, 0, obj.area[3]); });
-
@ulrik Ah, sorry my mistake! I was using the wrong function. Thanks for that.