mirror of
https://github.com/jokerx3/HeatUp
synced 2026-07-27 08:49:44 +02:00
Merge branch 'master' of github.com:jokerx3/prp
This commit is contained in:
@@ -7,8 +7,6 @@ import java.awt.Font;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JProgressBar;
|
||||
import javax.swing.border.LineBorder;
|
||||
|
||||
import de.heatup.ui.statusPanel.Score;
|
||||
import de.heatup.ui.statusPanel.Temperature;
|
||||
import de.heatup.ui.statusPanel.Timer;
|
||||
@@ -19,8 +17,8 @@ public class StatusPanelAdder{
|
||||
private Score score;
|
||||
private Timer timer;
|
||||
private static JPanel panel;
|
||||
private static int hgap=75;
|
||||
private static int vgap=7;
|
||||
private static int hgap=30;
|
||||
private static int vgap=9;
|
||||
|
||||
public int getTemp(){
|
||||
return temp.getTemp();
|
||||
@@ -41,9 +39,8 @@ public class StatusPanelAdder{
|
||||
|
||||
|
||||
JLabel labelTemp= new JLabel("temperature");
|
||||
labelTemp.setFont(new Font("Arial", Font.CENTER_BASELINE, 16));
|
||||
labelTemp.setBorder(new LineBorder(Color.BLACK, 1));
|
||||
|
||||
labelTemp.setFont(new Font("emulogic", Font.CENTER_BASELINE, 16));
|
||||
labelTemp.setForeground(Color.YELLOW);
|
||||
JProgressBar tempBar= new JProgressBar(30,90);
|
||||
tempBar.setValue(45);
|
||||
|
||||
@@ -51,50 +48,47 @@ public class StatusPanelAdder{
|
||||
tempPanel.setLayout(new BorderLayout(0,vgap));
|
||||
tempPanel.add(labelTemp, BorderLayout.NORTH);
|
||||
tempPanel.add(tempBar, BorderLayout.SOUTH);
|
||||
|
||||
tempPanel.setBackground(Color.BLACK);
|
||||
|
||||
|
||||
JLabel labelScore= new JLabel("score");
|
||||
labelScore.setFont(new Font("Arial", Font.CENTER_BASELINE, 16));
|
||||
//labelScore.setBorder(new LineBorder(Color.BLACK, 1));
|
||||
|
||||
labelScore.setFont(new Font("emulogic", Font.CENTER_BASELINE, 16));
|
||||
labelScore.setForeground(Color.YELLOW);
|
||||
JLabel scoreLabel= new JLabel("new Score Label");
|
||||
//scoreLabel.setBorder(new LineBorder(Color.BLACK, 1));
|
||||
|
||||
scoreLabel.setFont(new Font("emulogic", Font.CENTER_BASELINE, 12));
|
||||
scoreLabel.setForeground(Color.YELLOW);
|
||||
JPanel scorePanel=new JPanel();
|
||||
scorePanel.setLayout(new BorderLayout(0,vgap));
|
||||
scorePanel.add(labelScore, BorderLayout.NORTH);
|
||||
scorePanel.add(scoreLabel, BorderLayout.SOUTH);
|
||||
|
||||
scorePanel.setBackground(Color.BLACK);
|
||||
|
||||
JLabel labelPowerUp = new JLabel("PowerUp");
|
||||
labelPowerUp.setFont(new Font("Arial", Font.CENTER_BASELINE, 16));
|
||||
//labelPowerUp.setBorder(new LineBorder(Color.BLACK, 1));
|
||||
|
||||
labelPowerUp.setFont(new Font("emulogic", Font.CENTER_BASELINE, 16));
|
||||
labelPowerUp.setForeground(Color.YELLOW);
|
||||
JLabel powerUpLabel = new JLabel(/*new ImageIcon("path_to_image.png")*/"powerUpLabel");
|
||||
//powerUpLabel.setBorder(new LineBorder(Color.BLACK, 1));
|
||||
powerUpLabel.setFont(new Font("emulogic", Font.CENTER_BASELINE, 12));
|
||||
powerUpLabel.setForeground(Color.YELLOW);
|
||||
|
||||
JPanel powerUpPanel=new JPanel();
|
||||
powerUpPanel.setLayout(new BorderLayout(0,vgap));
|
||||
powerUpPanel.add(labelPowerUp, BorderLayout.NORTH);
|
||||
powerUpPanel.add(powerUpLabel, BorderLayout.SOUTH);
|
||||
|
||||
powerUpPanel.setBackground(Color.BLACK);
|
||||
|
||||
|
||||
JLabel labelTime=new JLabel("Time");
|
||||
labelTime.setFont(new Font("Arial", Font.CENTER_BASELINE, 16));
|
||||
//labelTime.setBorder(new LineBorder(Color.BLACK, 1));
|
||||
labelTime.setFont(new Font("emulogic", Font.CENTER_BASELINE, 16));
|
||||
labelTime.setSize(100,10);
|
||||
//labelTime.setHorizontalTextPosition(SwingConstants.CENTER);
|
||||
|
||||
labelTime.setForeground(Color.YELLOW);
|
||||
JLabel timeLabel = new JLabel("123456789");
|
||||
//timeLabel.setBorder(new LineBorder(Color.BLACK, 1));
|
||||
timeLabel.setFont(new Font("Arial", Font.ITALIC, 12));
|
||||
|
||||
timeLabel.setFont(new Font("emulogic", Font.CENTER_BASELINE, 12));
|
||||
timeLabel.setForeground(Color.YELLOW);
|
||||
JPanel timePanel=new JPanel();
|
||||
timePanel.setLayout(new BorderLayout(0,vgap));
|
||||
timePanel.add(labelTime, BorderLayout.NORTH);
|
||||
timePanel.add(timeLabel, BorderLayout.SOUTH);
|
||||
|
||||
timePanel.setBackground(Color.BLACK);
|
||||
|
||||
|
||||
|
||||
@@ -102,7 +96,7 @@ public class StatusPanelAdder{
|
||||
panel.add(scorePanel);
|
||||
panel.add(tempPanel);
|
||||
panel.add(powerUpPanel);
|
||||
|
||||
panel.setBackground(Color.BLACK);
|
||||
panel.setVisible(false);
|
||||
panel.setVisible(true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user