@@ -27,6 +27,7 @@ public class Menu implements Runnable {
2727 private static boolean gameOver = false ;
2828
2929 private static DedicatedJFrame frame ;// = new DedicatedJFrame(WIDTH, HEIGHT,
30+ private static final JDialog dialog = new JDialog ();
3031 // SCALE, NAME);
3132 private Font font = new Font ();
3233 private MouseListener Mouse = new Mouse ();
@@ -55,26 +56,27 @@ public static void play() {
5556 Thread .sleep (125 );
5657 UIManager .setLookAndFeel (UIManager .getSystemLookAndFeelClassName ());
5758 String multiMsg = "Sorry but multiplayer has been disabled on this version.\n If you would like multiplayer checkout Alpha 1.6" ;
58- JOptionPane .showMessageDialog (Game .getGame (), multiMsg ,
59+ dialog .setAlwaysOnTop (true );
60+ JOptionPane .showMessageDialog (dialog , multiMsg ,
5961 "Multiplayer Warning" , JOptionPane .WARNING_MESSAGE );
6062 // Game.setJdata_Host(JOptionPane.showConfirmDialog(Game.getGame(),
6163 // "Do you want to be the HOST?"));
6264 Game .setJdata_Host (1 );
6365 if (Game .getJdata_Host () != 1 ) { // Game.getJdata_Host() == 1
64- Game .setJdata_IP (JOptionPane .showInputDialog (Game . getGame () ,
66+ Game .setJdata_IP (JOptionPane .showInputDialog (dialog ,
6567 "Enter the name \n leave blank for local" ));
6668 }
6769 Thread .sleep (125 );
6870 splash .setProgress (70 , "Acquiring data: Username" );
69- String s = JOptionPane .showInputDialog (Game . getGame () ,
71+ String s = JOptionPane .showInputDialog (dialog ,
7072 "Enter a name" );
7173 if (s != null ) {
7274 Game .setJdata_UserName (s );
7375 }
7476 Thread .sleep (125 );
7577 splash .setProgress (90 , "Collecting Player Data" );
7678 Object [] options = {"African" , "Caucasian" };
77- int n = JOptionPane .showOptionDialog (frame ,
79+ int n = JOptionPane .showOptionDialog (dialog ,
7880 "Choose a race for the character to be" , "Choose a race" ,
7981 JOptionPane .YES_NO_OPTION , JOptionPane .QUESTION_MESSAGE ,
8082 null , options , options [0 ]);
@@ -85,7 +87,7 @@ public static void play() {
8587 }
8688 Thread .sleep (250 );
8789 Object [] options1 = {"Orange" , "Black" };
88- int n1 = JOptionPane .showOptionDialog (frame ,
90+ int n1 = JOptionPane .showOptionDialog (dialog ,
8991 "Which Colour do you want the shirt to be?" ,
9092 "Choose a shirt Colour" , JOptionPane .YES_NO_OPTION ,
9193 JOptionPane .QUESTION_MESSAGE , null , options1 , options1 [0 ]);
@@ -245,33 +247,27 @@ private void paintButtons(boolean start, boolean exit, Graphics g) {
245247 g .setColor (new Color (0xFFBB4400 ));
246248 g .fillRect (35 , 40 , (frame .getWidth () - 67 ), 113 );
247249 g .setColor (getDeSelected ());
248- g .fillRect (35 , 40 , (frame .getWidth () - 70 ), 110 );
249- g .setColor (Color .BLACK );
250- g .drawString ("Start" , 220 , 95 );
251250 } else {
252251 g .setColor (new Color (0xFFDD6600 ));
253252 g .fillRect (35 , 40 , (frame .getWidth () - 67 ), 113 );
254253 g .setColor (getSelected ());
255- g .fillRect (35 , 40 , (frame .getWidth () - 70 ), 110 );
256- g .setColor (Color .BLACK );
257- g .drawString ("Start" , 220 , 95 );
258254 }
255+ g .fillRect (35 , 40 , (frame .getWidth () - 70 ), 110 );
256+ g .setColor (Color .BLACK );
257+ g .drawString ("Start" , 220 , 95 );
259258 // EXIT
260259 if (!exit ) {
261260 g .setColor (new Color (0xFFBB4400 ));
262261 g .fillRect (35 , 170 , (frame .getWidth () - 67 ), 113 );
263262 g .setColor (getDeSelected ());
264- g .fillRect (35 , 170 , (frame .getWidth () - 70 ), 110 );
265- g .setColor (Color .BLACK );
266- g .drawString ("Exit" , 220 , 220 );
267263 } else {
268264 g .setColor (new Color (0xFFDD6600 ));
269265 g .fillRect (35 , 170 , (frame .getWidth () - 67 ), 113 );
270266 g .setColor (getSelected ());
271- g .fillRect (35 , 170 , (frame .getWidth () - 70 ), 110 );
272- g .setColor (Color .BLACK );
273- g .drawString ("Exit" , 220 , 220 );
274267 }
268+ g .fillRect (35 , 170 , (frame .getWidth () - 70 ), 110 );
269+ g .setColor (Color .BLACK );
270+ g .drawString ("Exit" , 220 , 220 );
275271 }
276272
277273 public Color getSelected () {
0 commit comments