mirror of
https://github.com/jokerx3/HeatUp
synced 2026-07-27 11:39:45 +02:00
Merge branch 'master' of github.com:jokerx3/prp
This commit is contained in:
@@ -4,17 +4,11 @@ import java.awt.BorderLayout;
|
|||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.FlowLayout;
|
import java.awt.FlowLayout;
|
||||||
import java.awt.Font;
|
import java.awt.Font;
|
||||||
import java.awt.GridBagConstraints;
|
|
||||||
import java.awt.GridLayout;
|
|
||||||
import java.awt.Insets;
|
|
||||||
|
|
||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import javax.swing.JProgressBar;
|
import javax.swing.JProgressBar;
|
||||||
import javax.swing.SwingConstants;
|
|
||||||
import javax.swing.border.LineBorder;
|
import javax.swing.border.LineBorder;
|
||||||
|
|
||||||
import de.heatup.testing.GameLoopD;
|
|
||||||
import de.heatup.ui.statusPanel.Score;
|
import de.heatup.ui.statusPanel.Score;
|
||||||
import de.heatup.ui.statusPanel.Temperature;
|
import de.heatup.ui.statusPanel.Temperature;
|
||||||
import de.heatup.ui.statusPanel.Timer;
|
import de.heatup.ui.statusPanel.Timer;
|
||||||
@@ -25,6 +19,8 @@ public class StatusPanelAdder{
|
|||||||
private Score score;
|
private Score score;
|
||||||
private Timer timer;
|
private Timer timer;
|
||||||
private static JPanel panel;
|
private static JPanel panel;
|
||||||
|
private static int hgap=75;
|
||||||
|
private static int vgap=7;
|
||||||
|
|
||||||
public int getTemp(){
|
public int getTemp(){
|
||||||
return temp.getTemp();
|
return temp.getTemp();
|
||||||
@@ -37,11 +33,13 @@ public class StatusPanelAdder{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void setPanel(JPanel newPanel){
|
public static void setPanel(JPanel newPanel){
|
||||||
newPanel.setLayout(new FlowLayout());
|
newPanel.setLayout(new FlowLayout(FlowLayout.CENTER, hgap,5));
|
||||||
panel=newPanel;
|
panel=newPanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void createPanel(){
|
public static void createPanel(){
|
||||||
|
|
||||||
|
|
||||||
JLabel labelTemp= new JLabel("temperature");
|
JLabel labelTemp= new JLabel("temperature");
|
||||||
labelTemp.setFont(new Font("Arial", Font.CENTER_BASELINE, 16));
|
labelTemp.setFont(new Font("Arial", Font.CENTER_BASELINE, 16));
|
||||||
labelTemp.setBorder(new LineBorder(Color.BLACK, 1));
|
labelTemp.setBorder(new LineBorder(Color.BLACK, 1));
|
||||||
@@ -50,7 +48,7 @@ public class StatusPanelAdder{
|
|||||||
tempBar.setValue(45);
|
tempBar.setValue(45);
|
||||||
|
|
||||||
JPanel tempPanel=new JPanel();
|
JPanel tempPanel=new JPanel();
|
||||||
tempPanel.setLayout(new BorderLayout());
|
tempPanel.setLayout(new BorderLayout(0,vgap));
|
||||||
tempPanel.add(labelTemp, BorderLayout.NORTH);
|
tempPanel.add(labelTemp, BorderLayout.NORTH);
|
||||||
tempPanel.add(tempBar, BorderLayout.SOUTH);
|
tempPanel.add(tempBar, BorderLayout.SOUTH);
|
||||||
|
|
||||||
@@ -64,7 +62,7 @@ public class StatusPanelAdder{
|
|||||||
//scoreLabel.setBorder(new LineBorder(Color.BLACK, 1));
|
//scoreLabel.setBorder(new LineBorder(Color.BLACK, 1));
|
||||||
|
|
||||||
JPanel scorePanel=new JPanel();
|
JPanel scorePanel=new JPanel();
|
||||||
scorePanel.setLayout(new BorderLayout());
|
scorePanel.setLayout(new BorderLayout(0,vgap));
|
||||||
scorePanel.add(labelScore, BorderLayout.NORTH);
|
scorePanel.add(labelScore, BorderLayout.NORTH);
|
||||||
scorePanel.add(scoreLabel, BorderLayout.SOUTH);
|
scorePanel.add(scoreLabel, BorderLayout.SOUTH);
|
||||||
|
|
||||||
@@ -76,7 +74,7 @@ public class StatusPanelAdder{
|
|||||||
JLabel powerUpLabel = new JLabel(/*new ImageIcon("path_to_image.png")*/"powerUpLabel");
|
JLabel powerUpLabel = new JLabel(/*new ImageIcon("path_to_image.png")*/"powerUpLabel");
|
||||||
//powerUpLabel.setBorder(new LineBorder(Color.BLACK, 1));
|
//powerUpLabel.setBorder(new LineBorder(Color.BLACK, 1));
|
||||||
JPanel powerUpPanel=new JPanel();
|
JPanel powerUpPanel=new JPanel();
|
||||||
powerUpPanel.setLayout(new BorderLayout());
|
powerUpPanel.setLayout(new BorderLayout(0,vgap));
|
||||||
powerUpPanel.add(labelPowerUp, BorderLayout.NORTH);
|
powerUpPanel.add(labelPowerUp, BorderLayout.NORTH);
|
||||||
powerUpPanel.add(powerUpLabel, BorderLayout.SOUTH);
|
powerUpPanel.add(powerUpLabel, BorderLayout.SOUTH);
|
||||||
|
|
||||||
@@ -93,7 +91,7 @@ public class StatusPanelAdder{
|
|||||||
timeLabel.setFont(new Font("Arial", Font.ITALIC, 12));
|
timeLabel.setFont(new Font("Arial", Font.ITALIC, 12));
|
||||||
|
|
||||||
JPanel timePanel=new JPanel();
|
JPanel timePanel=new JPanel();
|
||||||
timePanel.setLayout(new BorderLayout());
|
timePanel.setLayout(new BorderLayout(0,vgap));
|
||||||
timePanel.add(labelTime, BorderLayout.NORTH);
|
timePanel.add(labelTime, BorderLayout.NORTH);
|
||||||
timePanel.add(timeLabel, BorderLayout.SOUTH);
|
timePanel.add(timeLabel, BorderLayout.SOUTH);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user