Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
2015-06-11 16:31:21 +02:00
2 changed files with 32 additions and 30 deletions
+27 -26
View File
@@ -12,6 +12,7 @@ public class MenuButton {
private ArrayList<Color> colors;
private int x, y;
private int xx,yy;
private boolean selected;
private Song song;
Color color;
@@ -24,45 +25,45 @@ public class MenuButton {
}
public MenuButton(int x, int y, int xx, int yy, Color color, Song song){
this.x = x;
this.y = y;
this.color = color;
this.yy = yy;
this.xx = xx;
setSong(song);
}
public void draw(Graphics2D g2d){
if(selected){
g2d.setColor(color);
GeneralPath path = new GeneralPath();
path.moveTo(320, 540);
path.lineTo(320, 590);
path.lineTo(385, 565);
path.closePath();
g2d.fill(path);
g2d.setColor(Color.BLACK);
g2d.draw(path);
g2d.setColor(color.darker().darker().darker().darker());
g2d.fillRect(x-10, y-10,900,90);
}
g2d.setColor(color.darker().darker());
g2d.fillRect(x-5, y-5,890,80);
g2d.setColor(color);
g2d.fillRect(x,y,880,70);
if(selected){
g2d.fillRect(x-10, y-10,xx+20,yy+20);
g2d.setColor(color.darker().darker());
g2d.fillRect(x-5, y-5,xx+10,yy+10);
g2d.setColor(color);
g2d.fillRect(x,y,xx,yy);
g2d.setColor(Color.BLACK);
g2d.drawRect(x-10, y-10, 900, 90);
g2d.drawRect(x-5, y-5, 890, 80);
g2d.drawRect(x, y, 880, 70);
g2d.drawRect(x-10, y-10, xx+20, yy+20);
g2d.drawRect(x-5, y-5, xx+10, yy+10);
g2d.drawRect(x, y, xx, yy);
}
else{
g2d.setColor(color.darker().darker());
g2d.fillRect(x-5, y-5,890,80);
g2d.setColor(color);
g2d.fillRect(x,y,880,70);
}
//draw text
g2d.setColor(Color.BLACK);
Font textFont = new Font("OCR A Extended", Font.BOLD,60);
g2d.setFont(textFont);
g2d.drawString(song.getTitle(), x+50, y+57);
if(selected)
g2d.drawString(song.getTitle(), x+50, y+63);
else
g2d.drawString(song.getTitle(), x+50, y+57);
}