Menu font name constant
This commit is contained in:
parent
a0538d97d3
commit
b03e58b3e0
@ -13,6 +13,7 @@ public final class Constants {
|
||||
public static final int WIDTH = 800, HEIGHT = 600;
|
||||
public static final boolean RESIZABLE = false;
|
||||
public static final Dimension SCREEN_DIMENSION = new Dimension(WIDTH, HEIGHT);
|
||||
public static final String MENU_FONT_NAME = "Stencil";
|
||||
public static final Font GAME_FONT = new Font("Times New Roman", Font.PLAIN, 24);
|
||||
|
||||
// Parameters
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.annimon.turrets;
|
||||
|
||||
import static com.annimon.turrets.Constants.MENU_FONT_NAME;
|
||||
import static com.annimon.turrets.Constants.SCREEN_DIMENSION;
|
||||
import com.annimon.turrets.util.GuiUtil;
|
||||
import com.annimon.turrets.util.Prefs;
|
||||
@ -36,7 +37,7 @@ public final class MenuPanel extends JPanel {
|
||||
// Init menu list
|
||||
menuList = new JList<>(MENU_ITEMS);
|
||||
menuList.setOpaque(false);
|
||||
menuList.setFont(new Font("Stencil", Font.BOLD, 42));
|
||||
menuList.setFont(new Font(MENU_FONT_NAME, Font.BOLD, 42));
|
||||
menuList.setForeground(Color.GRAY);
|
||||
menuList.setBackground(Color.BLACK);
|
||||
menuList.setSelectionBackground(Color.BLACK);
|
||||
@ -53,7 +54,7 @@ public final class MenuPanel extends JPanel {
|
||||
// Init title
|
||||
final JLabel titleLabel = new JLabel("Turrets Online");
|
||||
titleLabel.setForeground(TITLE_COLOR);
|
||||
titleLabel.setFont(new Font("Stencil", Font.BOLD, 70));
|
||||
titleLabel.setFont(new Font(MENU_FONT_NAME, Font.BOLD, 70));
|
||||
titleLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
|
||||
// Init panel
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.annimon.turrets;
|
||||
|
||||
import static com.annimon.turrets.Constants.MENU_FONT_NAME;
|
||||
import static com.annimon.turrets.Constants.SCREEN_DIMENSION;
|
||||
import com.annimon.turrets.util.ExceptionHandler;
|
||||
import com.annimon.turrets.util.Prefs;
|
||||
@ -27,7 +28,7 @@ import javax.swing.text.MaskFormatter;
|
||||
*/
|
||||
public final class OptionsPanel extends JPanel {
|
||||
|
||||
private static final Font FONT = new Font("Stencil", 1, 30);
|
||||
private static final Font FONT = new Font(MENU_FONT_NAME, 1, 30);
|
||||
private static final int VERT_INSET = 80, HOR_INSET = 50;
|
||||
|
||||
private final JCheckBox soundCheckBox;
|
||||
|
Loading…
Reference in New Issue
Block a user