mirror of
https://github.com/jokerx3/HeatUp
synced 2026-07-27 08:59:44 +02:00
StatusPanelVeränderung bei Textsetzung von PowerUp geändert
This commit is contained in:
@@ -3,6 +3,7 @@ package de.heatup.ui;
|
|||||||
import java.awt.BorderLayout;
|
import java.awt.BorderLayout;
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
|
import java.awt.Dimension;
|
||||||
import java.awt.FlowLayout;
|
import java.awt.FlowLayout;
|
||||||
import java.awt.Font;
|
import java.awt.Font;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -38,7 +39,7 @@ public class StatusPanelAdder{
|
|||||||
private static JProgressBar tempBar;
|
private static JProgressBar tempBar;
|
||||||
private static JLabel labelScore= new JLabel("score");
|
private static JLabel labelScore= new JLabel("score");
|
||||||
private static JLabel scoreLabel= new JLabel(" ");
|
private static JLabel scoreLabel= new JLabel(" ");
|
||||||
private static JLabel labelPowerUp = new JLabel("PowerUp");
|
private static JLabel labelPowerUp = new JLabel("! PowerUp !");
|
||||||
private static JLabel powerUpLabel = new JLabel(" ");
|
private static JLabel powerUpLabel = new JLabel(" ");
|
||||||
private static JLabel labelTime=new JLabel("Time");
|
private static JLabel labelTime=new JLabel("Time");
|
||||||
private static JLabel timeLabel = new JLabel("0");
|
private static JLabel timeLabel = new JLabel("0");
|
||||||
@@ -74,7 +75,7 @@ public class StatusPanelAdder{
|
|||||||
* @param newPanel das zu verwendende Panel zur Bearbeitung
|
* @param newPanel das zu verwendende Panel zur Bearbeitung
|
||||||
*/
|
*/
|
||||||
public static void setPanel(JPanel newPanel){
|
public static void setPanel(JPanel newPanel){
|
||||||
newPanel.setLayout(new FlowLayout(FlowLayout.CENTER, hgap,5));
|
newPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 45, vgap));
|
||||||
panel=newPanel;
|
panel=newPanel;
|
||||||
}
|
}
|
||||||
public static void setPUText(String s){
|
public static void setPUText(String s){
|
||||||
@@ -122,6 +123,9 @@ public class StatusPanelAdder{
|
|||||||
tempPlus=-1;
|
tempPlus=-1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
* Änderung der Farbe der TempBar
|
||||||
|
*/
|
||||||
red=((float)(((tempBar.getValue())-30)/80.0));
|
red=((float)(((tempBar.getValue())-30)/80.0));
|
||||||
blue=(1-red);
|
blue=(1-red);
|
||||||
tempBarColor=new Color(red, green,blue, (float)0.525);
|
tempBarColor=new Color(red, green,blue, (float)0.525);
|
||||||
@@ -129,7 +133,9 @@ public class StatusPanelAdder{
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Logging von Temp
|
||||||
|
*/
|
||||||
|
|
||||||
if (temping!=0){
|
if (temping!=0){
|
||||||
Logger.write("Temperatur: " + tempBar.getValue());
|
Logger.write("Temperatur: " + tempBar.getValue());
|
||||||
@@ -195,6 +201,7 @@ public class StatusPanelAdder{
|
|||||||
powerUpPanel.add(labelPowerUp, BorderLayout.NORTH);
|
powerUpPanel.add(labelPowerUp, BorderLayout.NORTH);
|
||||||
powerUpPanel.add(powerUpLabel, BorderLayout.SOUTH);
|
powerUpPanel.add(powerUpLabel, BorderLayout.SOUTH);
|
||||||
powerUpPanel.setBackground(Color.BLACK);
|
powerUpPanel.setBackground(Color.BLACK);
|
||||||
|
//powerUpPanel.setPreferredSize(new Dimension(160,60));
|
||||||
|
|
||||||
JPanel timePanel=new JPanel();
|
JPanel timePanel=new JPanel();
|
||||||
labelTime.setFont(emulogicheading);
|
labelTime.setFont(emulogicheading);
|
||||||
|
|||||||
Reference in New Issue
Block a user