made the grid better so it can actually be used for every scene now (just added opacity lol)
This commit is contained in:
parent
9273beb673
commit
1ef67b3d13
2 changed files with 15 additions and 7 deletions
|
|
@ -27,7 +27,7 @@ public class Game extends JPanel implements ActionListener {
|
|||
// colors I'll be using
|
||||
public static Color backgroundGreen = new Color(45, 73, 45);
|
||||
public static Color lightGreen = new Color(100, 120, 100);
|
||||
public static Color darkGreen = new Color(40, 65, 40);
|
||||
public static Color gridGreen = new Color(40, 65, 40, 95); // the color for the backgroud grid effect
|
||||
public static Color darkerGreen = new Color(25, 50, 25);
|
||||
|
||||
// text hover animation and if it should hover down or up
|
||||
|
|
|
|||
|
|
@ -19,12 +19,12 @@ public class Update {
|
|||
}
|
||||
|
||||
static void paint(Game m, Graphics g) {
|
||||
if (m.scene.equals("game entry")) {
|
||||
g.setColor(m.darkerGreen);
|
||||
g.fillRect(0, 500, m.windowWidth, m.windowHeight-500);
|
||||
}
|
||||
if (m.scene.equals("main_menu")) {
|
||||
g.setColor(m.darkGreen);
|
||||
for (int i = 0; i < 100; i++) {
|
||||
g.drawLine(0, 6*i, m.windowWidth, 6*i);
|
||||
g.drawLine(8*i, 0, 8*i, m.windowHeight);
|
||||
}
|
||||
// options
|
||||
g.setColor(m.lightGreen);
|
||||
g.setFont(m.gameFont.deriveFont(75f));
|
||||
if (m.chosenOption == 1) {
|
||||
|
|
@ -38,14 +38,22 @@ public class Update {
|
|||
} else {
|
||||
m.chosenOption = 1;
|
||||
}
|
||||
// title
|
||||
g.drawString("by dvorakmortonxd", 135, 290+m.textHoverAmount/4);
|
||||
g.setFont(m.gameFont.deriveFont(150f));
|
||||
g.drawString("Retro", 230, 120+m.textHoverAmount/4);
|
||||
g.drawString("Game", 235, 220+m.textHoverAmount/4);
|
||||
// tip
|
||||
g.setFont(m.gameFont.deriveFont(40f));
|
||||
g.drawString("tip: use arrow keys to navigate through menu", 65, 550);
|
||||
g.drawString("and enter to pick an option!", 200, 580);
|
||||
Toolkit.getDefaultToolkit().sync();
|
||||
}
|
||||
// background grid effect
|
||||
g.setColor(m.gridGreen);
|
||||
for (int i = 0; i < 100; i++) {
|
||||
g.drawLine(0, 6*i, m.windowWidth, 6*i);
|
||||
g.drawLine(8*i, 0, 8*i, m.windowHeight);
|
||||
}
|
||||
Toolkit.getDefaultToolkit().sync();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue