diff --git a/Tetris/bin/tetris/GameOverPanel.class b/Tetris/bin/tetris/GameOverPanel.class
index a43efc5..38b76de 100644
Binary files a/Tetris/bin/tetris/GameOverPanel.class and b/Tetris/bin/tetris/GameOverPanel.class differ
diff --git a/Tetris/bin/tetris/MenuPanel.class b/Tetris/bin/tetris/MenuPanel.class
index c62550b..6b4ced1 100644
Binary files a/Tetris/bin/tetris/MenuPanel.class and b/Tetris/bin/tetris/MenuPanel.class differ
diff --git a/Tetris/bin/tetris/SettingsPanel.class b/Tetris/bin/tetris/SettingsPanel.class
index 26fa2f7..acee31d 100644
Binary files a/Tetris/bin/tetris/SettingsPanel.class and b/Tetris/bin/tetris/SettingsPanel.class differ
diff --git a/Tetris/bin/tetris/TetrisPane.class b/Tetris/bin/tetris/TetrisPane.class
index f1ea6ab..23ed6c6 100644
Binary files a/Tetris/bin/tetris/TetrisPane.class and b/Tetris/bin/tetris/TetrisPane.class differ
diff --git a/Tetris/src/tetris/GameOverPanel.java b/Tetris/src/tetris/GameOverPanel.java
index 51a0d2f..ce3e763 100644
--- a/Tetris/src/tetris/GameOverPanel.java
+++ b/Tetris/src/tetris/GameOverPanel.java
@@ -30,13 +30,13 @@ public class GameOverPanel extends JPanel {
private JButton restartButton;
private JButton menuButton;
- private static final Color BACKGROUND_COLOR = new Color(25, 25, 35);
- private static final Color TITLE_COLOR = new Color(255, 120, 120);
- private static final Color LABEL_COLOR = new Color(240, 240, 240);
- private static final Color VALUE_COLOR = new Color(255, 180, 100);
- private static final Color BUTTON_COLOR = new Color(60, 120, 100);
- private static final Color BUTTON_HOVER_COLOR = new Color(80, 150, 130);
- private static final Color PANEL_COLOR = new Color(35, 35, 45);
+ private static final Color BACKGROUND_COLOR = new Color(245, 247, 250);
+ private static final Color TITLE_COLOR = new Color(255, 100, 130);
+ private static final Color LABEL_COLOR = new Color(80, 80, 100);
+ private static final Color VALUE_COLOR = new Color(100, 120, 255);
+ private static final Color BUTTON_COLOR = new Color(70, 130, 255);
+ private static final Color BUTTON_HOVER_COLOR = new Color(100, 160, 255);
+ private static final Color PANEL_COLOR = new Color(235, 238, 245);
private static final String FONT_NAME = "Microsoft YaHei";
diff --git a/Tetris/src/tetris/MenuPanel.java b/Tetris/src/tetris/MenuPanel.java
index dce4fdf..c1bd68c 100644
--- a/Tetris/src/tetris/MenuPanel.java
+++ b/Tetris/src/tetris/MenuPanel.java
@@ -25,11 +25,11 @@ public class MenuPanel extends JPanel {
private JButton settingsButton;
private JButton exitButton;
- private static final Color BACKGROUND_COLOR = new Color(25, 25, 35);
- private static final Color TITLE_COLOR = new Color(255, 180, 100);
- private static final Color BUTTON_COLOR = new Color(60, 120, 100);
- private static final Color BUTTON_HOVER_COLOR = new Color(80, 150, 130);
- private static final Color BUTTON_TEXT_COLOR = new Color(240, 240, 240);
+ private static final Color BACKGROUND_COLOR = new Color(245, 247, 250);
+ private static final Color TITLE_COLOR = new Color(100, 120, 255);
+ private static final Color BUTTON_COLOR = new Color(70, 130, 255);
+ private static final Color BUTTON_HOVER_COLOR = new Color(100, 160, 255);
+ private static final Color BUTTON_TEXT_COLOR = Color.WHITE;
private static final String FONT_NAME = "Microsoft YaHei";
@@ -103,7 +103,7 @@ private void setupLayout() {
JPanel infoPanel = new JPanel();
infoPanel.setBackground(BACKGROUND_COLOR);
JLabel infoLabel = new JLabel(getControlsText());
- infoLabel.setForeground(Color.LIGHT_GRAY);
+ infoLabel.setForeground(new Color(80, 80, 100));
infoLabel.setFont(new Font(FONT_NAME, Font.PLAIN, 12));
infoPanel.add(infoLabel);
add(infoPanel, BorderLayout.SOUTH);
@@ -158,7 +158,7 @@ private String getControlsText() {
protected void paintComponent(Graphics g) {
super.paintComponent(g);
- g.setColor(new Color(80, 60, 40, 20));
+ g.setColor(new Color(150, 180, 255, 30));
for (int i = 0; i < 25; i++) {
int x = (int) (Math.random() * getWidth());
int y = (int) (Math.random() * getHeight());
diff --git a/Tetris/src/tetris/SettingsPanel.java b/Tetris/src/tetris/SettingsPanel.java
index cae7fd4..6eab6cd 100644
--- a/Tetris/src/tetris/SettingsPanel.java
+++ b/Tetris/src/tetris/SettingsPanel.java
@@ -35,12 +35,12 @@ public class SettingsPanel extends JPanel {
private JButton backButton;
private JButton applyButton;
- private static final Color BACKGROUND_COLOR = new Color(25, 25, 35);
- private static final Color TITLE_COLOR = new Color(255, 180, 100);
- private static final Color LABEL_COLOR = new Color(240, 240, 240);
- private static final Color BUTTON_COLOR = new Color(60, 120, 100);
- private static final Color BUTTON_HOVER_COLOR = new Color(80, 150, 130);
- private static final Color PANEL_COLOR = new Color(35, 35, 45);
+ private static final Color BACKGROUND_COLOR = new Color(245, 247, 250);
+ private static final Color TITLE_COLOR = new Color(100, 120, 255);
+ private static final Color LABEL_COLOR = new Color(80, 80, 100);
+ private static final Color BUTTON_COLOR = new Color(70, 130, 255);
+ private static final Color BUTTON_HOVER_COLOR = new Color(100, 160, 255);
+ private static final Color PANEL_COLOR = new Color(235, 238, 245);
private static final String FONT_NAME = "Microsoft YaHei";
diff --git a/Tetris/src/tetris/TetrisPane.java b/Tetris/src/tetris/TetrisPane.java
index ab02400..ea20e42 100644
--- a/Tetris/src/tetris/TetrisPane.java
+++ b/Tetris/src/tetris/TetrisPane.java
@@ -61,11 +61,11 @@ public class TetrisPane extends JPanel {
private JLabel nextPieceLabel;
private JLabel controlsLabel;
- private static final Color BACKGROUND_COLOR = new Color(20, 20, 30);
- private static final Color GRID_COLOR = new Color(35, 35, 50);
- private static final Color INFO_PANEL_COLOR = new Color(25, 25, 35);
- private static final Color LABEL_COLOR = new Color(255, 180, 100);
- private static final Color VALUE_COLOR = new Color(240, 240, 240);
+ private static final Color BACKGROUND_COLOR = new Color(230, 235, 245);
+ private static final Color GRID_COLOR = new Color(210, 220, 240);
+ private static final Color INFO_PANEL_COLOR = new Color(245, 247, 250);
+ private static final Color LABEL_COLOR = new Color(100, 120, 255);
+ private static final Color VALUE_COLOR = new Color(80, 80, 100);
private static final String FONT_NAME = "Microsoft YaHei";
@@ -126,7 +126,7 @@ private void initInfoPanel() {
JLabel[] controlLabels = createControlLabels();
for (JLabel label : controlLabels) {
label.setBounds(20, y, 140, 25);
- label.setForeground(Color.LIGHT_GRAY);
+ label.setForeground(new Color(100, 100, 120));
infoPanel.add(label);
y += 25;
}
@@ -140,7 +140,7 @@ private void initInfoPanel() {
}
private JLabel createInfoLabel(String text, String value, int y) {
- JLabel label = new JLabel("" + text + "
" + value + "");
+ JLabel label = new JLabel("" + text + "
" + value + "");
label.setBounds(20, y, 140, 50);
label.setForeground(LABEL_COLOR);
label.setFont(new Font(FONT_NAME, Font.BOLD, 14));
@@ -204,7 +204,7 @@ private void paintGameArea(Graphics g) {
int offsetX = 10;
int offsetY = 10;
- g2d.setColor(new Color(60, 60, 80));
+ g2d.setColor(new Color(200, 210, 230));
g2d.fillRect(offsetX - 2, offsetY - 2, COLUMNS * cellSize + 4, ROWS * cellSize + 4);
g2d.setColor(GRID_COLOR);
@@ -219,7 +219,7 @@ private void paintGameArea(Graphics g) {
}
}
- g2d.setColor(new Color(25, 25, 40));
+ g2d.setColor(new Color(220, 230, 245));
for (int i = 0; i <= ROWS; i++) {
g2d.drawLine(
offsetX,
@@ -254,10 +254,10 @@ private void paintGameArea(Graphics g) {
}
if (state.isPaused()) {
- g2d.setColor(new Color(0, 0, 0, 150));
+ g2d.setColor(new Color(200, 200, 220, 180));
g2d.fillRect(offsetX, offsetY, COLUMNS * cellSize, ROWS * cellSize);
- g2d.setColor(Color.WHITE);
+ g2d.setColor(new Color(60, 80, 150));
g2d.setFont(new Font(FONT_NAME, Font.BOLD, 36));
String pauseText = config.getLanguage() == GameConfig.LANGUAGE_CHINESE ? "暂停" : "PAUSED";
int textWidth = g2d.getFontMetrics().stringWidth(pauseText);
@@ -401,16 +401,16 @@ public void run() {
private void updateInfoLabels() {
if (scoreLabel != null) {
- scoreLabel.setText("" + getScoreText() + "
" + state.getScore() + "");
+ scoreLabel.setText("" + getScoreText() + "
" + state.getScore() + "");
}
if (levelLabel != null) {
- levelLabel.setText("" + getLevelText() + "
" + state.getLevel() + "");
+ levelLabel.setText("" + getLevelText() + "
" + state.getLevel() + "");
}
if (linesLabel != null) {
- linesLabel.setText("" + getLinesText() + "
" + state.getLines() + "");
+ linesLabel.setText("" + getLinesText() + "
" + state.getLines() + "");
}
if (timeLabel != null) {
- timeLabel.setText("" + getTimeText() + "
" + state.getFormattedTime() + "");
+ timeLabel.setText("" + getTimeText() + "
" + state.getFormattedTime() + "");
}
}