race GUI refactored, making minor adjustments/tweaks to components
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package GUI;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
public interface PanelTheme {
|
||||
|
||||
public Color deepRed = new Color(165, 42, 42);
|
||||
public Color lightBrown = new Color(222, 184, 135);
|
||||
public Color darkBrown = new Color(205, 133, 63);
|
||||
|
||||
public Color black = new Color(0, 0, 0);
|
||||
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package GUI.Panels;
|
||||
|
||||
import GUI.PanelTheme;
|
||||
import GUI.Panels.SubPanels.*;
|
||||
|
||||
import java.awt.*;
|
||||
@@ -7,7 +8,7 @@ import java.awt.*;
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.*;
|
||||
|
||||
public class ChooseRacePanel extends JPanel {
|
||||
public class ChooseRacePanel extends JPanel implements PanelTheme {
|
||||
|
||||
private String[] raceOptions;
|
||||
|
||||
@@ -70,10 +71,10 @@ public class ChooseRacePanel extends JPanel {
|
||||
|
||||
private JPanel createRaceButtonPanel() {
|
||||
|
||||
JPanel raceBtnPanel = new JPanel();
|
||||
raceBtnPanel.setBackground(new Color(165, 42, 42));
|
||||
raceBtnPanel.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
|
||||
raceBtnPanel.setBounds(311, 6, 409, 394);
|
||||
JPanel raceBtnPanel = new JPanel(new GridLayout(raceOptions.length, 1, 15, 5));
|
||||
raceBtnPanel.setBackground(darkBrown);
|
||||
raceBtnPanel.setBounds(311, 6, 109, 394);
|
||||
|
||||
|
||||
for (int i = 0; i < raceOptions.length; i++) {
|
||||
|
||||
@@ -87,8 +88,7 @@ public class ChooseRacePanel extends JPanel {
|
||||
|
||||
private void panelSetup() {
|
||||
|
||||
setBackground(new Color(222, 184, 135));
|
||||
setBorder(new BevelBorder(BevelBorder.RAISED, new Color(160, 82, 45), new Color(165, 42, 42), new Color(0, 0, 0), null));
|
||||
setBackground(lightBrown);
|
||||
setLayout(new BorderLayout(0, 0));
|
||||
|
||||
}
|
||||
@@ -96,7 +96,7 @@ public class ChooseRacePanel extends JPanel {
|
||||
private JPanel createNavPanel() {
|
||||
|
||||
JPanel panel = new JPanel();
|
||||
panel.setBackground(new Color(205, 133, 63));
|
||||
panel.setBackground(darkBrown);
|
||||
|
||||
panel.add(backButton);
|
||||
panel.add(continueButton);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package GUI.Panels.SubPanels;
|
||||
|
||||
import GUI.PanelTheme;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.BevelBorder;
|
||||
@@ -9,7 +11,7 @@ import java.io.File;
|
||||
import java.util.Objects;
|
||||
import java.util.Random;
|
||||
|
||||
public class InfoPanel extends JPanel {
|
||||
public class InfoPanel extends JPanel implements PanelTheme {
|
||||
|
||||
private JTextArea[] descriptions;
|
||||
private String[] holderDescriptions;
|
||||
@@ -75,7 +77,6 @@ public class InfoPanel extends JPanel {
|
||||
private void panelSetup() {
|
||||
|
||||
setOpaque(false);
|
||||
setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
|
||||
setBounds(6, 6, 293, 394);
|
||||
setLayout(null);
|
||||
|
||||
@@ -159,7 +160,7 @@ public class InfoPanel extends JPanel {
|
||||
|
||||
portraits[i][index] = image(file);
|
||||
portraits[i][index].setOpaque(true);
|
||||
portraits[i][index].setBackground(new Color(238, 232, 170));
|
||||
portraits[i][index].setBackground(lightBrown);
|
||||
portraits[i][index].setBounds(6, 229, 281, 159);
|
||||
|
||||
index++;
|
||||
|
||||
Reference in New Issue
Block a user