Browse Source

create hit points number label

master
Yazan Alaamer 2 years ago
parent
commit
5ef8e2b438
  1. 6
      src/main/java/game/StartDarkSoulsGame.java

6
src/main/java/game/StartDarkSoulsGame.java

@ -21,6 +21,7 @@ public class StartDarkSoulsGame {
JPanel playerPanel; JPanel playerPanel;
JTextArea mainTextArea; JTextArea mainTextArea;
JLabel hpLabel; JLabel hpLabel;
JLabel hpLabelNumber;
Font titelFont = new Font("Times new Roman", Font.PLAIN, 90); Font titelFont = new Font("Times new Roman", Font.PLAIN, 90);
Font normalFont = new Font ("Times new Roman", Font.PLAIN, 28); Font normalFont = new Font ("Times new Roman", Font.PLAIN, 28);
JButton startButton; JButton startButton;
@ -116,6 +117,11 @@ public class StartDarkSoulsGame {
hpLabel.setForeground(Color.white); hpLabel.setForeground(Color.white);
playerPanel.add(hpLabel); playerPanel.add(hpLabel);
hpLabelNumber = new JLabel();
hpLabelNumber.setFont(normalFont);
hpLabelNumber.setForeground(Color.white);
playerPanel.add(hpLabelNumber);
con.add(playerPanel); con.add(playerPanel);
} }
public class TitelScreenHandler implements ActionListener{ public class TitelScreenHandler implements ActionListener{

Loading…
Cancel
Save