Help++
This commit is contained in:
@@ -42,7 +42,8 @@ public class MenuState extends GameState {
|
|||||||
|
|
||||||
int yPosDiffButton = 900;
|
int yPosDiffButton = 900;
|
||||||
private int difSelect=0;
|
private int difSelect=0;
|
||||||
Font textFont2 = new Font("OCR A Extended", Font.BOLD, 50);
|
Font textFont = new Font("OCR A Extended", Font.BOLD, 50);
|
||||||
|
Font textFontSmall = new Font("OCR A Extended", Font.BOLD, 15);
|
||||||
BufferedImage aanwijzers = Images.getImage(ImageType.aanwijzers);
|
BufferedImage aanwijzers = Images.getImage(ImageType.aanwijzers);
|
||||||
int index = 0;
|
int index = 0;
|
||||||
|
|
||||||
@@ -188,7 +189,7 @@ public class MenuState extends GameState {
|
|||||||
Graphics2D g2 = mainScreenBackground.createGraphics();
|
Graphics2D g2 = mainScreenBackground.createGraphics();
|
||||||
RenderingHints rh = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
|
RenderingHints rh = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
|
||||||
g2.setRenderingHints(rh);
|
g2.setRenderingHints(rh);
|
||||||
g2.setFont(textFont2);
|
g2.setFont(textFont);
|
||||||
g2.setPaint(new GradientPaint(0, 0, new Color(0,0,1, 0.6f),1280,1024 ,new Color(0,0,1, 0.2f)));
|
g2.setPaint(new GradientPaint(0, 0, new Color(0,0,1, 0.6f),1280,1024 ,new Color(0,0,1, 0.2f)));
|
||||||
g2.fillRect(0, 0, 1280, 1024);
|
g2.fillRect(0, 0, 1280, 1024);
|
||||||
g2.setPaint(new GradientPaint(0, 0, new Color(1,1,0, 0.6f),1280,1024 ,new Color(0,0,1, 0.2f)));
|
g2.setPaint(new GradientPaint(0, 0, new Color(1,1,0, 0.6f),1280,1024 ,new Color(0,0,1, 0.2f)));
|
||||||
@@ -209,8 +210,28 @@ public class MenuState extends GameState {
|
|||||||
|
|
||||||
g2.setColor(Color.BLACK);
|
g2.setColor(Color.BLACK);
|
||||||
g2.drawString("Main Menu", 32, 60);
|
g2.drawString("Main Menu", 32, 60);
|
||||||
|
|
||||||
|
g2.setFont(textFontSmall);
|
||||||
|
|
||||||
|
//select
|
||||||
|
g2.setColor(GameModel.colors[0]);
|
||||||
|
g2.fillOval(20, 900, 30, 30);
|
||||||
|
g2.drawString("Play", 55, 920);
|
||||||
|
|
||||||
|
//letters
|
||||||
|
g2.setColor(GameModel.colors[1]);
|
||||||
|
g2.fillOval(20, 940, 30, 30);
|
||||||
|
g2.drawString("A-Z", 55, 960);
|
||||||
|
|
||||||
|
//most played
|
||||||
|
g2.setColor(GameModel.colors[4]);
|
||||||
|
g2.fillOval(20, 980, 30, 30);
|
||||||
|
g2.drawString("Most Played", 55, 1000);
|
||||||
g2.dispose();
|
g2.dispose();
|
||||||
|
|
||||||
mainScreenBackground.createGraphics();
|
mainScreenBackground.createGraphics();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void generateSubScreenBackground(){
|
public void generateSubScreenBackground(){
|
||||||
@@ -241,7 +262,7 @@ public class MenuState extends GameState {
|
|||||||
g2.setComposite(AlphaComposite.SrcOver);
|
g2.setComposite(AlphaComposite.SrcOver);
|
||||||
g2.setRenderingHints(rh);
|
g2.setRenderingHints(rh);
|
||||||
g2.setColor(Color.BLACK);
|
g2.setColor(Color.BLACK);
|
||||||
g2.setFont(textFont2);
|
g2.setFont(textFont);
|
||||||
g2.drawString(selectedToSong(selected).getTitle(), 30, 60);
|
g2.drawString(selectedToSong(selected).getTitle(), 30, 60);
|
||||||
|
|
||||||
|
|
||||||
@@ -253,6 +274,39 @@ public class MenuState extends GameState {
|
|||||||
for(DifficultyButton b : buttons2){
|
for(DifficultyButton b : buttons2){
|
||||||
b.draw(g2);
|
b.draw(g2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g2.setFont(textFontSmall);
|
||||||
|
|
||||||
|
//play song
|
||||||
|
g2.setColor(GameModel.colors[0]);
|
||||||
|
g2.fillOval(20, 860, 30, 30);
|
||||||
|
g2.drawString("Play", 55, 880);
|
||||||
|
|
||||||
|
//back
|
||||||
|
g2.setColor(GameModel.colors[2]);
|
||||||
|
g2.fillOval(20, 900, 30, 30);
|
||||||
|
g2.drawString("Back", 55, 920);
|
||||||
|
|
||||||
|
//up
|
||||||
|
g2.setColor(Color.BLACK);
|
||||||
|
Polygon p = new Polygon();
|
||||||
|
p.addPoint(35, 940);
|
||||||
|
p.addPoint(20, 960);
|
||||||
|
p.addPoint(50, 960);
|
||||||
|
g2.fillPolygon(p);
|
||||||
|
g2.drawString("Up", 55, 960);
|
||||||
|
|
||||||
|
//down
|
||||||
|
Polygon p2 = new Polygon();
|
||||||
|
p2.addPoint(35, 1000);
|
||||||
|
p2.addPoint(20, 980);
|
||||||
|
p2.addPoint(50, 980);
|
||||||
|
g2.fillPolygon(p2);
|
||||||
|
|
||||||
|
g2.drawString("Down", 55, 1000);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
g2.dispose();
|
g2.dispose();
|
||||||
subScreenForeground.createGraphics();
|
subScreenForeground.createGraphics();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user