-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEscolherPokemonInicial.java
More file actions
70 lines (58 loc) · 2.86 KB
/
EscolherPokemonInicial.java
File metadata and controls
70 lines (58 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class EscolherPokemonInicial extends JPanel{
public EscolherPokemonInicial(Game frame) {
editar(frame);
}
private void editar(Game frame) {
setLayout(new BorderLayout());
Font Fonte = DefinirFonte.fonte();
JLabel background = new JLabel();
background.setFocusable(true);
background.setIcon(new ImageIcon("assets/backgroundImages/info.png"));
background.setBounds(0, 0, 960, 640);
ActionListener nextPage = e -> {
String pokemonEscolhido = Player.pokemonSelecionado.getNome();
Tutorial tutorial = new Tutorial(frame, new String[]{ "Incrivel, " + Player.nome + "!", pokemonEscolhido + "Excelente escolha para comecar.", "Boa sorte em sua Aventura Pokemon!" }, new Home(frame));
frame.mudarTela(tutorial);
};
JButton bulbasaurOption = new JButton(new ImageIcon("assets/pokemons/bulbassaulto.png"));
bulbasaurOption.setBounds(50, 300, 250, 186);
bulbasaurOption.addActionListener(e -> {
System.out.println("Bulbasaur selecionado!");
frame.setPlayer(new Player("Bulbasaur", frame));
nextPage.actionPerformed(e);
});
background.add(bulbasaurOption);
JLabel bulbasaurLabel = new JLabel("Bulbasaur");
bulbasaurLabel.setFont(Fonte.deriveFont(Font.PLAIN,50f));
bulbasaurLabel.setBounds(50, 180, 250, 186);
background.add(bulbasaurLabel);
JButton charmanderOption = new JButton(new ImageIcon("assets/pokemons/chalizarBaby.png"));
charmanderOption.setBounds(350, 300, 250, 186);
charmanderOption.addActionListener(e -> {
frame.setPlayer(new Player("Charmander", frame));
System.out.println("Charmander selecionado!");
nextPage.actionPerformed(e);
});
background.add(charmanderOption);
JLabel charmanderLabel = new JLabel("Charmander");
charmanderLabel.setFont(Fonte.deriveFont(Font.PLAIN,50f));
charmanderLabel.setBounds(350, 180, 250, 186);
background.add(charmanderLabel);
JButton squirtleOption = new JButton(new ImageIcon("assets/pokemons/squitou.png"));
squirtleOption.setBounds(650, 300, 250, 186);
squirtleOption.addActionListener(e -> {
System.out.println("Squirtle selecionado!");
frame.setPlayer(new Player("Squirtle", frame));
nextPage.actionPerformed(e);
});
background.add(squirtleOption);
JLabel squirtleLabel = new JLabel("Squirtle");
squirtleLabel.setFont(Fonte.deriveFont(Font.PLAIN,50f));
squirtleLabel.setBounds(650, 180, 250, 186);
background.add(squirtleLabel);
add(background, BorderLayout.NORTH);
}
}