From 2f199350ee3d62fceb0aa251306afe7fcc5714de Mon Sep 17 00:00:00 2001 From: feschi55 Date: Tue, 13 Jan 2015 14:49:30 +0100 Subject: [PATCH] Aussehen der Bars von Action/Status-Panel verbessert --- HeatUp/src/de/heatup/ui/StatusPanelAdder.java | 28 +++++++++---------- .../heatup/ui/actionPanel/ActionControl.java | 4 +++ 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/HeatUp/src/de/heatup/ui/StatusPanelAdder.java b/HeatUp/src/de/heatup/ui/StatusPanelAdder.java index 4e51176..decdbf3 100644 --- a/HeatUp/src/de/heatup/ui/StatusPanelAdder.java +++ b/HeatUp/src/de/heatup/ui/StatusPanelAdder.java @@ -21,34 +21,33 @@ import de.heatup.ui.statusPanel.Timer; public class StatusPanelAdder{ - private static JPanel panel; - private static int hgap=32; - private static int vgap=9; - private static int modifier=-1; - private static int temping=0; - private static int manipulations=0; + private static Color tempBarColor= new Color(0,0,255); private static double tempPlus=0.0; private static double tempMinus=0.0; private static double barSpeed=0.01; private static float red; private static float green; private static float blue; - private static boolean ende=false; + private static Font emulogicheading; + private static Font emulogictext; + private static Font emulogictextsmall; + private static Font ttfBase; + private static FontLoader fl=new FontLoader(); + private static int vgap=9; + private static int modifier=-1; + private static int temping=0; + private static int manipulations=0; private static JLabel labelTempC= new JLabel("ยง"); private static JLabel labelTemp= new JLabel("temperature"); - private static JProgressBar tempBar; private static JLabel labelScore= new JLabel("score"); private static JLabel scoreLabel= new JLabel(" "); private static JLabel labelPowerUp = new JLabel("! P o w e r U p !"); private static JLabel powerUpLabel = new JLabel(" "); private static JLabel labelTime=new JLabel("Time"); private static JLabel timeLabel = new JLabel("0"); - private static Font emulogicheading; - private static Font emulogictext; - private static Font emulogictextsmall; - private static Font ttfBase; - private static FontLoader fl=new FontLoader(); - private static Color tempBarColor= new Color(0,0,255); + private static JPanel panel; + private static JProgressBar tempBar; + @@ -160,6 +159,7 @@ public class StatusPanelAdder{ labelTemp.setHorizontalAlignment(SwingConstants.CENTER); tempBar= new JProgressBar(0,110); tempBar.setValue(30); + tempBar.setBorderPainted(false); labelTempC.setFont(emulogictext); labelTempC.setHorizontalAlignment(SwingConstants.CENTER); labelTempC.setForeground(Color.YELLOW); diff --git a/HeatUp/src/de/heatup/ui/actionPanel/ActionControl.java b/HeatUp/src/de/heatup/ui/actionPanel/ActionControl.java index a344ef5..edba565 100644 --- a/HeatUp/src/de/heatup/ui/actionPanel/ActionControl.java +++ b/HeatUp/src/de/heatup/ui/actionPanel/ActionControl.java @@ -36,6 +36,9 @@ public class ActionControl{ actionLabel = new JLabel(); bigActionLabel = new JLabel(); bar = new JProgressBar(); + bar.setForeground(Color.YELLOW); + bar.setBackground(Color.BLACK); + bar.setBorderPainted(false); //actionLabel.setFont(new Font("Arial", Font.CENTER_BASELINE, 16)); actionLabel.setFont(emulogicaction); actionLabel.setHorizontalAlignment(JLabel.CENTER); @@ -109,6 +112,7 @@ public class ActionControl{ if(bar.getValue()>1){ if(tmpCount%2==0)bar.setValue(bar.getValue()-1); if(bar.getValue()<3)bar.setValue(0); + } }else{ if(tmpCount%3==0)bar.setValue(bar.getValue()-1);