mirror of
https://github.com/jokerx3/HeatUp
synced 2026-07-27 12:19:45 +02:00
ActionControl Anpassungen
This commit is contained in:
@@ -8,41 +8,41 @@ import javax.swing.*;
|
||||
import javax.swing.border.LineBorder;
|
||||
|
||||
public class ActionControl {
|
||||
private Smashing smashing;
|
||||
private Keysequence keysequence;
|
||||
private JPanel panel;
|
||||
private JLabel comp;
|
||||
private static Smashing smashing;
|
||||
private static Keysequence keysequence;
|
||||
private static JPanel panel;
|
||||
private static JLabel comp;
|
||||
|
||||
public void setPanel(JPanel newPanel){
|
||||
public static void setPanel(JPanel newPanel){
|
||||
panel = newPanel;
|
||||
smashing = new Smashing();
|
||||
keysequence = new Keysequence();
|
||||
comp = new JLabel();
|
||||
panel.add(comp);
|
||||
}
|
||||
|
||||
public void setAction(String s){
|
||||
|
||||
public static void setAction(String s){
|
||||
System.out.println("prompt");
|
||||
if(s.equals("smashing")){
|
||||
smashing = new Smashing();
|
||||
String tmp= "Bitte die Taste "+smashing.getKey()+" so schnell wie möglich drücken";
|
||||
comp = new JLabel(tmp);
|
||||
String str= "Bitte die Taste "+smashing.getKey()+" 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));
|
||||
comp.setSize(100,10);
|
||||
panel.add(comp);
|
||||
panel.setVisible(false);
|
||||
panel.setVisible(true);
|
||||
}else{
|
||||
keysequence = new Keysequence();
|
||||
String tmp="Bitte diese Tastenkombination "+keysequence.getKeySequence()[0]+" "+keysequence.getKeySequence()[1]+" "+keysequence.getKeySequence()[2]+" "+keysequence.getKeySequence()[3]+" "+" so schnell wie möglich drücken";
|
||||
comp = new JLabel(tmp);
|
||||
char []tmp = keysequence.getKeySequence();
|
||||
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));
|
||||
comp.setBorder(new LineBorder(Color.BLACK, 1));
|
||||
comp.setSize(100,10);
|
||||
panel.add(comp);
|
||||
panel.setVisible(false);
|
||||
panel.setVisible(true);
|
||||
|
||||
}
|
||||
}
|
||||
public void wishPanel(){
|
||||
comp.setVisible(false);
|
||||
public static void wishPanel(){
|
||||
comp.setText("");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user