From ae33787a6c06e67226c88ac688d32706503ae5a5 Mon Sep 17 00:00:00 2001 From: fdai4581 Date: Wed, 8 Feb 2023 23:02:17 +0100 Subject: [PATCH] update --- src/main/java/MenuPanel.java | 25 ++++++++++++++----------- target/classes/MenuPanel$AL.class | Bin 858 -> 858 bytes target/classes/MenuPanel.class | Bin 1370 -> 1462 bytes 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/main/java/MenuPanel.java b/src/main/java/MenuPanel.java index f8fdf9c..5c0d587 100644 --- a/src/main/java/MenuPanel.java +++ b/src/main/java/MenuPanel.java @@ -1,12 +1,12 @@ import BattleShip.BShip; -import PingPong.GamePanel; +import PingPong.*; import javax.swing.*; import java.awt.*; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; -import java.awt.event.KeyListener; + public class MenuPanel extends JPanel { @@ -22,16 +22,19 @@ public class MenuPanel extends JPanel { super.paintComponent(g); draw(g); } - public void draw(Graphics g) { - g.setColor(Color.WHITE); - g.setFont(new Font("Consolas", Font.BOLD, 70)); - g.drawString("GAME MENU", 330, 100); - g.setFont(new Font("Consolas", Font.BOLD, 30)); - g.drawString("Press 'ENTER' to start the game", 265, 200); - g.setFont(new Font("Consolas", Font.PLAIN, 10)); - g.drawString("Created by Hells Gamers", 450, 450); + public void draw(Graphics g) { + g.setColor(Color.WHITE); + g.setFont(new Font("Consolas", Font.BOLD, 70)); + g.drawString("GAME MENU", 330, 100); + g.setFont(new Font("Consolas", Font.BOLD, 30)); + g.drawString("Press 1 to start Pong Game", 265, 200); + g.drawString("Press 2 to start BattleShip", 265, 250); + g.drawString("Press 3 to start Snake Game", 265, 300); + + g.setFont(new Font("Consolas", Font.PLAIN, 10)); + g.drawString("Created by HellsGamers", 450, 450); - } + } public class AL extends KeyAdapter { diff --git a/target/classes/MenuPanel$AL.class b/target/classes/MenuPanel$AL.class index d12278c1935e88e0aacf163075ff29bc1f40893a..9ca14ab545398e22e2815b6c13e65aaaeee47136 100644 GIT binary patch delta 47 zcmcb`c8hI80TZM8k07y#_$ B2k-y@ delta 47 zcmcb`c8hI80TZLjErk14L}0tRq5SR38hVgb7fAk$_lr1 z(^Asq(v_0Z?+hQd8N$tZyfa_ZEvsncu5a#r*lio;JBD0IzcpHfG(#|H8oFf^l#2&t z!zdQH%QiWKm@F6ULE(vI?7FbPvi7$SspKeIFBsJc?BjsCh#02nCPO*}4=up2YBi{; z=3u5uM-Q@8`yo&bq6OTvIuL&CwTChrAUoi@!nDOCC!2*HamyDf{O|jRPZ7qr6@>L(8gNppPEy|r9D)IBp07!AH!2G zQ4~CQ5-;9;nBpWYvdhf3GxM8o9ZPOGY-M-@hX z5UHrARoB1QS)4GG_XF)m`cBHzr&vOUNQt?WDZ!#zZp#}9Hb*pdpUF3w z^30FeU46$+$FA{$d_g_N-kN<}WS?|n91Lj4LSnUqtZ_5*hb|Ou=#_kLWaa%^d1EV% VcFJAglCmJ{NnDYVshY+$*dO$zG}r(D