mirror of
https://github.com/jokerx3/HeatUp
synced 2026-07-27 08:39:45 +02:00
Temperaturzahl hinzugefügt
This commit is contained in:
@@ -2,12 +2,15 @@ package de.heatup.ui;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Color;
|
||||
import java.awt.Component;
|
||||
import java.awt.FlowLayout;
|
||||
import java.awt.Font;
|
||||
import java.io.File;
|
||||
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JProgressBar;
|
||||
|
||||
import de.heatup.logging.Logger;
|
||||
import de.heatup.ui.statusPanel.Score;
|
||||
import de.heatup.ui.statusPanel.Timer;
|
||||
@@ -24,7 +27,8 @@ public class StatusPanelAdder{
|
||||
private static double tempMinus=0.0;
|
||||
private static int temping=0;
|
||||
private static double barSpeed=0.01;
|
||||
|
||||
private static boolean ende=false;
|
||||
private static JLabel labelTempC= new JLabel("§");
|
||||
private static JLabel labelTemp= new JLabel("temperature");
|
||||
private static JProgressBar tempBar;
|
||||
private static JLabel labelScore= new JLabel("score");
|
||||
@@ -51,11 +55,6 @@ public class StatusPanelAdder{
|
||||
Logger.write("Font implemented");
|
||||
return ttfBase;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static void raiseMod(){
|
||||
if (modifier==-1){
|
||||
modifier=1;
|
||||
@@ -87,6 +86,7 @@ public class StatusPanelAdder{
|
||||
|
||||
|
||||
public static void tick() {
|
||||
labelTempC.setText(tempBar.getValue() + "°C");
|
||||
temping=0;
|
||||
if (modifier<0){
|
||||
barSpeed=0.01;
|
||||
@@ -111,7 +111,10 @@ public class StatusPanelAdder{
|
||||
} else {
|
||||
tempBar.setValue(tempBar.getValue()+temping);
|
||||
}
|
||||
if (tempBar.getValue()==110)Logger.write("EEENNNDDEEEE");
|
||||
if (tempBar.getValue()==110&&(ende=false)){
|
||||
Logger.write("EEENNNDDEEEE");
|
||||
ende = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -124,17 +127,21 @@ public class StatusPanelAdder{
|
||||
implementFont();
|
||||
emulogicheading = ttfBase.deriveFont(Font.PLAIN, 16);
|
||||
emulogictext= ttfBase.deriveFont(Font.PLAIN, 12);
|
||||
|
||||
JPanel tempPanel=new JPanel();
|
||||
labelTemp.setFont(emulogicheading);
|
||||
labelTemp.setForeground(Color.YELLOW);
|
||||
tempBar= new JProgressBar(30,110);
|
||||
tempBar.setValue(45);
|
||||
tempPanel.setLayout(new BorderLayout(0,vgap));
|
||||
tempBar= new JProgressBar(0,110);
|
||||
tempBar.setValue(30);
|
||||
labelTempC.setFont(emulogictext);
|
||||
labelTempC.setAlignmentX(Component.CENTER_ALIGNMENT);
|
||||
labelTempC.setForeground(Color.YELLOW);
|
||||
tempPanel.setLayout(new BorderLayout(0,vgap/2));
|
||||
tempPanel.add(labelTemp, BorderLayout.NORTH);
|
||||
tempPanel.add(tempBar, BorderLayout.SOUTH);
|
||||
tempPanel.add(tempBar, BorderLayout.CENTER);
|
||||
tempPanel.add(labelTempC, BorderLayout.SOUTH);
|
||||
tempPanel.setBackground(Color.BLACK);
|
||||
|
||||
|
||||
JPanel scorePanel=new JPanel();
|
||||
labelScore.setFont(emulogicheading);
|
||||
labelScore.setForeground(Color.YELLOW);
|
||||
|
||||
Reference in New Issue
Block a user