diff --git a/core/src/zero1hd/rhythmbullet/audio/WavAudioData.java b/core/src/zero1hd/rhythmbullet/audio/WavAudioData.java index f7b0fba..6d1e560 100755 --- a/core/src/zero1hd/rhythmbullet/audio/WavAudioData.java +++ b/core/src/zero1hd/rhythmbullet/audio/WavAudioData.java @@ -111,7 +111,6 @@ public class WavAudioData implements MusicManager { @Override public void setPosition(float position) { playbackMusic.setPosition(position); - } @Override diff --git a/core/src/zero1hd/rhythmbullet/audio/visualizer/BasicVisualizer.java b/core/src/zero1hd/rhythmbullet/audio/visualizer/BasicVisualizer.java index dd66659..5f3257d 100755 --- a/core/src/zero1hd/rhythmbullet/audio/visualizer/BasicVisualizer.java +++ b/core/src/zero1hd/rhythmbullet/audio/visualizer/BasicVisualizer.java @@ -24,12 +24,12 @@ public class BasicVisualizer extends VisualizerCore { private float barHeightMultiplier; private float rotation; private Vector2 angleRad; - + public BasicVisualizer() { super(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()/2, 0, 0); barHeightMultiplier = Gdx.graphics.getHeight()*0.008f; pixmap = new Pixmap(2, 2, Format.RGBA8888); - pixmap.setColor(Color.GRAY); + pixmap.setColor(Color.WHITE); pixmap.fill(); barCount = 70; barWidth = MathUtils.ceil((float) width/(float) barCount); @@ -108,6 +108,18 @@ public class BasicVisualizer extends VisualizerCore { } } + public void setColor(Color color) { + for (int i = 0; i < bars.length; i++) { + bars[i].setColor(color); + } + } + + public void setColor(float r, float g, float b, float a) { + for (int i = 0; i < bars.length; i++) { + bars[i].setColor(r, g, b, a); + } + } + @Override public void setHeight(int height) { updatePositionInfo(); diff --git a/core/src/zero1hd/rhythmbullet/ui/components/Visualizer.java b/core/src/zero1hd/rhythmbullet/ui/components/Visualizer.java index a294f17..5079567 100755 --- a/core/src/zero1hd/rhythmbullet/ui/components/Visualizer.java +++ b/core/src/zero1hd/rhythmbullet/ui/components/Visualizer.java @@ -1,5 +1,6 @@ package zero1hd.rhythmbullet.ui.components; +import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.g2d.Batch; import com.badlogic.gdx.math.Vector2; import com.badlogic.gdx.scenes.scene2d.ui.Widget; @@ -91,4 +92,16 @@ public class Visualizer extends Widget { vis.updatePositionInfo(); super.layout(); } + + @Override + public void setColor(Color color) { + vis.setColor(color); + super.setColor(color); + } + + @Override + public void setColor(float r, float g, float b, float a) { + vis.setColor(r, g, b, a); + super.setColor(r, g, b, a); + } }