From a60e083dac5eeda4b8ba37692fa05f008d2fcbf1 Mon Sep 17 00:00:00 2001 From: Ivan Date: Fri, 7 Nov 2014 21:29:05 +0100 Subject: [PATCH] =?UTF-8?q?Kommentar=20f=C3=BCr=20die=20Entwicklung=20hinz?= =?UTF-8?q?ugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../de/heatup/ui/actionPanel/ActionControl.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/HeatUp/src/de/heatup/ui/actionPanel/ActionControl.java b/HeatUp/src/de/heatup/ui/actionPanel/ActionControl.java index a3354ef..c6513cd 100644 --- a/HeatUp/src/de/heatup/ui/actionPanel/ActionControl.java +++ b/HeatUp/src/de/heatup/ui/actionPanel/ActionControl.java @@ -24,7 +24,15 @@ public class ActionControl { public static void setAction(String s){ System.out.println("prompt"); if(s.equals("smashing")){ - String str= "Bitte die Taste "+smashing.getKey()+" so schnell wie möglich drücken"; + char tmp = smashing.getKey(); + + + //Hier soll eine Methode rein, sowas wie setTaste() oder setKey(), welche in der Manipulationshändling Klasse + //Implemintiert ist. Damit das Programm weiß welche Tasten Ausgelost wurden. Man übergibt einfach den tmp Char weiter. + + + + String str= "Bitte die Taste "+tmp+" so schnell wie möglich drücken"; comp.setText(str); comp.setFont(new Font("Arial", Font.CENTER_BASELINE, 16)); comp.setBorder(new LineBorder(Color.BLACK, 1)); @@ -33,6 +41,11 @@ public class ActionControl { panel.setVisible(true); }else{ char []tmp = keysequence.getKeySequence(); + + + //Das selbe wie oben... + + String str="Bitte diese Tastenkombination \""+tmp[0]+" "+tmp[1]+" "+tmp[2]+" "+tmp[3]+"\" "+"so schnell wie möglich eingeben"; comp.setText(str); comp.setFont(new Font("Arial", Font.CENTER_BASELINE, 16));