public final class Theme
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Theme.PlayerTheme
Enum with specific colours for the different players.
|
Modifier and Type | Field and Description |
---|---|
static java.awt.Color |
ADD_COLOR
Color used for the add button icons and text.
|
static java.awt.Color |
ADD_COLOR_HIGHLIGHT
Color used for the add button icons and text when highlighted.
|
static int |
ADD_ICON_SIZE
Size of the player/ai add button icons.
|
static java.awt.image.BufferedImage |
AI_ADD
AI add image.
|
static java.awt.image.BufferedImage |
AI_ADD_HIGHLIGHT
AI add image when highlighted.
|
static java.awt.Color |
BACKGROUND
Playfield background color.
|
static java.awt.Color |
BAR_NAME_COLOR
Result screen bar chart player name color.
|
static java.awt.Color |
BAR_SCORE_COLOR
Result screen bar chart score color.
|
static java.awt.Color |
BORDER_COLOR
Result screen border color.
|
static java.awt.Stroke |
BORDER_STROKE
Stroke used to draw the menu panel gradient border.
|
static java.awt.Color |
BORDER_TEXT_COLOR
Result screen titled border text color.
|
static java.awt.Color |
BOX_SECONDARY_COLOR
Box text color for bullet points and such.
|
static java.awt.Color |
BOX_TEXT_COLOR
Box header color.
|
static java.awt.Color |
BUTTON_HOVER_COLOR
Button on hover background color.
|
static java.awt.Color |
BUTTON_SELECT
Button select color for the new game screen.
|
static java.awt.Stroke |
BUTTON_STROKE
Stroke for the new game double lighten borders.
|
static java.awt.Color |
BUTTON_TEXT_COLOR
Button text color.
|
static java.awt.image.BufferedImage |
CHEVRON_ICON
Chevron icon used for the combo box.
|
static int |
CHEVRON_ICON_SIZE
Size of the chevron icon.
|
static java.awt.Color |
CROWN_COLOR
Leading crown icon color.
|
static java.awt.image.BufferedImage |
CROWN_ICON
Smaller crown image with size 18.
|
static java.awt.image.BufferedImage |
CROWN_ICON_LARGE
Larger crown image with size 24.
|
static int |
CROWN_ICON_LARGE_SIZE
Dimensions of the large crown image.
|
static int |
CROWN_ICON_SIZE
Dimensions of the crown image.
|
static java.awt.Color |
DOUBLE_LIGHTEN
Double lighten new game screen color.
|
static java.awt.Color |
ERROR_COLOR
Colour used for showing invalid input or warnings.
|
static java.awt.Color |
GRAPH_MARK_COLOR
Result screen graph marker text color.
|
static java.awt.Stroke |
GRAPH_MARK_STROKE
Stroke used for the graph marker lines.
|
static java.awt.Stroke |
GRAPH_STROKE
Stroke used for the graph player data lines.
|
static java.awt.Stroke |
HELPER_STROKE
Stroke used to draw the playfield merge helper lines.
|
static java.awt.Color |
LIGHTEN
Lighten new game screen color.
|
static java.awt.Color |
LINK_COLOR
Hyper link color.
|
static java.awt.Color |
MAIN_MENU_BUTTON
Result screen main menu button text color.
|
static java.awt.Color |
MAIN_MENU_BUTTON_HOVER
Result screen main menu button hover text color.
|
static java.awt.Color |
MENU_BODY
Playfield menu/score display area background.
|
static java.awt.Color |
OVERLAY_BACKGROUND
Color used to darken the playfield when on the result screen.
|
static java.awt.image.BufferedImage |
PLAYER_ADD
Player add image.
|
static java.awt.image.BufferedImage |
PLAYER_ADD_HIGHLIGHT
Player add image when highlighted.
|
static int |
PLAYER_ICON_SIZE
Dimensions of the player icon.
|
static int |
PLAYER_ICON_SIZE_SMALL
Dimensions of the small player icon.
|
static java.awt.Stroke |
POLY_STROKE
Stroke used to draw the outline of playfield convex objects.
|
static java.awt.Font |
PRIDI_MEDIUM_10
Pridi medium font with size 10, used for graph markers.
|
static java.awt.Font |
PRIDI_MEDIUM_12
Pridi medium font with size 12, used for titled borders.
|
static java.awt.Font |
PRIDI_MEDIUM_13
Pridi medium font with size 13, used for bar chart scores.
|
static java.awt.Font |
PRIDI_MEDIUM_14
Pridi medium font with size 14, used for text fields.
|
static java.awt.Font |
PRIDI_MEDIUM_16
Pridi medium font with size 16, used for bar chart names and result overlay stats.
|
static java.awt.Font |
PRIDI_MEDIUM_24
Pridi medium font with size 24, used for playfield player names.
|
static java.awt.Font |
PRIDI_MEDIUM_30
Pridi medium font with size 30, used for the info menu title.
|
static java.awt.Font |
PRIDI_MEDIUM_36
Pridi medium font with size 36, used for the result overlay title.
|
static java.awt.Font |
PRIDI_REGULAR_12
Pridi regular font with size 12, used for the rules.
|
static java.awt.Font |
PRIDI_REGULAR_14
Pridi regular font with size 14, used for the rules.
|
static java.awt.Font |
PRIDI_REGULAR_16
Pridi regular font with size 18, used for the playfield hint.
|
static java.awt.Font |
PRIDI_REGULAR_18
Pridi regular font with size 16, used for the playfield hint.
|
static java.awt.Font |
PRIDI_REGULAR_24
Pridi regular font with size 24, used for buttons.
|
static java.awt.Color |
PRIMARY_COLOR
Color used for the result screen divider and graph markers.
|
static java.awt.Color |
REMOVE_BUTTON_HIGHLIGHT
Remove button highlight color.
|
static java.awt.image.BufferedImage |
REMOVE_ICON
Remove icon.
|
static java.awt.image.BufferedImage |
REMOVE_ICON_HIGHLIGHT
Remove icon when highlighted.
|
static int |
REMOVE_ICON_SIZE
Size of the remove thrash can icon.
|
static java.awt.Stroke |
RESULTS_STROKE
Stroke used for borders on the result screen.
|
static java.awt.Color |
SCORE_COLOR
Playfield player score color.
|
static java.awt.Color |
SCORE_COLOR_LEAD
Playfield leading player score color.
|
Constructor and Description |
---|
Theme() |
Modifier and Type | Method and Description |
---|---|
static java.awt.LinearGradientPaint |
constructBorderGradient(GameState state,
int width)
Constructs a linear rainbow gradient whose colours depend on
the number of players in the given game state.
|
static java.lang.String |
formatScore(double area)
Formats the given area by rounding to an integer and
adding dots to separate digits into groups of three.
|
static java.awt.Color |
getPlayerBody(ConvexObject obj)
Gets the color to use to draw the body for the given convex object.
|
static java.awt.Color |
getPlayerOutline(ConvexObject obj)
Gets the color to use to draw the outline for the given convex object.
|
private static java.awt.image.BufferedImage |
loadImage(java.io.InputStream in,
int size,
java.awt.Color color)
Loads an image from the given input stream, resizes it to the given
size and recolours it with the given color.
|
public static final java.awt.Color BACKGROUND
public static final java.awt.Color MENU_BODY
public static final java.awt.Color SCORE_COLOR
public static final java.awt.Color SCORE_COLOR_LEAD
public static final java.awt.Color BAR_NAME_COLOR
public static final java.awt.Color BAR_SCORE_COLOR
public static final java.awt.Color CROWN_COLOR
public static final java.awt.Color PRIMARY_COLOR
public static final java.awt.Color OVERLAY_BACKGROUND
public static final java.awt.Color BORDER_COLOR
public static final java.awt.Color BORDER_TEXT_COLOR
public static final java.awt.Color GRAPH_MARK_COLOR
public static final java.awt.Color BOX_TEXT_COLOR
public static final java.awt.Color BOX_SECONDARY_COLOR
public static final java.awt.Color BUTTON_HOVER_COLOR
public static final java.awt.Color BUTTON_TEXT_COLOR
public static final java.awt.Color LIGHTEN
public static final java.awt.Color DOUBLE_LIGHTEN
public static final java.awt.Color ADD_COLOR
public static final java.awt.Color ADD_COLOR_HIGHLIGHT
public static final java.awt.Color REMOVE_BUTTON_HIGHLIGHT
public static final java.awt.Color BUTTON_SELECT
public static final java.awt.Color MAIN_MENU_BUTTON
public static final java.awt.Color MAIN_MENU_BUTTON_HOVER
public static final java.awt.Color LINK_COLOR
public static final java.awt.Color ERROR_COLOR
public static final java.awt.Stroke POLY_STROKE
public static final java.awt.Stroke BORDER_STROKE
public static final java.awt.Stroke HELPER_STROKE
public static final java.awt.Stroke RESULTS_STROKE
public static final java.awt.Stroke GRAPH_STROKE
public static final java.awt.Stroke GRAPH_MARK_STROKE
public static final java.awt.Stroke BUTTON_STROKE
public static final java.awt.Font PRIDI_REGULAR_12
public static final java.awt.Font PRIDI_REGULAR_14
public static final java.awt.Font PRIDI_REGULAR_16
public static final java.awt.Font PRIDI_REGULAR_18
public static final java.awt.Font PRIDI_REGULAR_24
public static final java.awt.Font PRIDI_MEDIUM_10
public static final java.awt.Font PRIDI_MEDIUM_12
public static final java.awt.Font PRIDI_MEDIUM_13
public static final java.awt.Font PRIDI_MEDIUM_14
public static final java.awt.Font PRIDI_MEDIUM_16
public static final java.awt.Font PRIDI_MEDIUM_24
public static final java.awt.Font PRIDI_MEDIUM_30
public static final java.awt.Font PRIDI_MEDIUM_36
public static final int PLAYER_ICON_SIZE
public static final int PLAYER_ICON_SIZE_SMALL
public static final int CROWN_ICON_SIZE
CROWN_ICON
,
Constant Field Valuespublic static final int CROWN_ICON_LARGE_SIZE
CROWN_ICON_LARGE
,
Constant Field Valuespublic static final int ADD_ICON_SIZE
public static final int REMOVE_ICON_SIZE
public static final int CHEVRON_ICON_SIZE
public static final java.awt.image.BufferedImage CROWN_ICON
public static final java.awt.image.BufferedImage CROWN_ICON_LARGE
public static final java.awt.image.BufferedImage AI_ADD
public static final java.awt.image.BufferedImage AI_ADD_HIGHLIGHT
public static final java.awt.image.BufferedImage PLAYER_ADD
public static final java.awt.image.BufferedImage PLAYER_ADD_HIGHLIGHT
public static final java.awt.image.BufferedImage REMOVE_ICON
public static final java.awt.image.BufferedImage REMOVE_ICON_HIGHLIGHT
public static final java.awt.image.BufferedImage CHEVRON_ICON
public static java.lang.String formatScore(double area)
area
- The area score to format.public static final java.awt.Color getPlayerBody(ConvexObject obj)
obj
- The convex object to get the body color for.public static final java.awt.Color getPlayerOutline(ConvexObject obj)
obj
- The convex object to get the outline color for.public static final java.awt.LinearGradientPaint constructBorderGradient(GameState state, int width)
state
- The active game, null
will construct
a gradient with 4 colours.width
- The current viewport width.private static final java.awt.image.BufferedImage loadImage(java.io.InputStream in, int size, java.awt.Color color) throws java.io.IOException
in
- The input stream to read the image from.size
- The size to rescale to.color
- The color to recolour to.java.io.IOException
- When an IOException occurs.