Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
drawButton() {
if (!this.bufferLoaded) {
this.form.fillOnly("#9ab").text( [20,30], "Loading..." );
return;
}
if (!this.sound || !this.sound.playing) {
this.form.fillOnly("#f06").rect( [[0,0], [50,50]] );
this.form.fillOnly('#fff').polygon( Triangle.fromCenter( [25,25], 10 ).rotate2D( Const.half_pi, [25,25] ) );
} else {
this.form.fillOnly("rgba(0,0,0,.2)").rect( [[0,0], [50,50]] );
this.form.fillOnly("#fff").rect( [[18, 18], [32,32]] );
}
}