1
0

Add constant for font name

This commit is contained in:
Victor 2014-03-22 20:52:07 +02:00
parent 6753ddc1c1
commit fbda2f2dbb
2 changed files with 2 additions and 3 deletions

View File

@ -12,6 +12,7 @@ public interface Constants {
public static final int WIDTH = 800, HEIGHT = 600;
public static final boolean RESIZABLE = false;
public static final Dimension SCREEN_DIMENSION = new Dimension(Constants.WIDTH, Constants.HEIGHT);
public static final String FONT_NAME = "Times New Roman";
// Parameters
public static final boolean DEBUG_MODE = true;

View File

@ -13,7 +13,6 @@ import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.IOException;
import javax.swing.UIManager;
/**
*
@ -40,7 +39,7 @@ public class GameCanvas extends DoubleBufferedCanvas implements Runnable, Networ
background = new BufferedImage(Constants.WIDTH, Constants.HEIGHT, BufferedImage.TYPE_INT_RGB);
initBackground();
font = new Font("Times New Roman", Font.PLAIN, 24);
font = new Font(Constants.FONT_NAME, Font.PLAIN, 24);
gameStarted = false;
}
@ -63,7 +62,6 @@ public class GameCanvas extends DoubleBufferedCanvas implements Runnable, Networ
@Override
public void onStatusChanged(int status, Object data) {
System.out.println("move: " + serverMove);
if (serverInstance) serverNetworkStatus(status, data);
else clientNetworkStatus(status, data);
}