Browse Source

create hit points label

master
Yazan Alaamer 2 years ago
parent
commit
42749bdf4a
  1. 7
      src/main/java/game/StartDarkSoulsGame.java

7
src/main/java/game/StartDarkSoulsGame.java

@ -20,6 +20,7 @@ public class StartDarkSoulsGame {
JPanel choiceButtonPanel;
JPanel playerPanel;
JTextArea mainTextArea;
JLabel hpLabel;
Font titelFont = new Font("Times new Roman", Font.PLAIN, 90);
Font normalFont = new Font ("Times new Roman", Font.PLAIN, 28);
JButton startButton;
@ -109,6 +110,12 @@ public class StartDarkSoulsGame {
playerPanel.setBounds(100,15,600,50);
playerPanel.setBackground(Color.red);
playerPanel.setLayout(new GridLayout(1,4));
hpLabel = new JLabel("HP:");
hpLabel.setFont(normalFont);
hpLabel.setForeground(Color.white);
playerPanel.add(hpLabel);
con.add(playerPanel);
}
public class TitelScreenHandler implements ActionListener{

Loading…
Cancel
Save