Repository navigation
Expand file tree
/
Copy pathAbilities.java
More file actions
115 lines (93 loc) · 4.1 KB
/
Copy pathAbilities.java
File metadata and controls
115 lines (93 loc) · 4.1 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
import javax.swing.*;
import java.awt.*;
/** GUI window showing all possible abilities and what they are */
public class Abilities {
public Abilities() {
JFrame frame = new JFrame("Abilities");
JPanel panel = new JPanel();
frame.setSize(600,400);
frame.setLocationByPlatform(true);
frame.setResizable(false);
frame.setLocationRelativeTo(null);
panel.setLayout(null);
// Speed ability icon
ImageIcon speedImg = new ImageIcon("data/abilities/speed.png");
JLabel speed = new JLabel("",speedImg,JLabel.CENTER);
speed.setBounds(0,0,100,100);
panel.add(speed);
// Speed ability title
JLabel speedTitle = new JLabel("Speed boost");
speedTitle.setFont(new Font("MV Boli", Font.BOLD,25));
speedTitle.setBounds(100,25,150,50);
speedTitle.setForeground(Color.yellow);
panel.add(speedTitle);
// Jump ability icon
ImageIcon jumpImg = new ImageIcon("data/abilities/jump.png");
JLabel jump = new JLabel("",jumpImg,JLabel.CENTER);
jump.setBounds(0,0,100,280);
panel.add(jump);
// Jump ability title
JLabel jumpTitle = new JLabel("Jump boost");
jumpTitle.setFont(new Font("MV Boli", Font.BOLD,25));
jumpTitle.setBounds(100,125,150,50);
jumpTitle.setForeground(Color.red);
panel.add(jumpTitle);
// Goal enlargement ability icon
ImageIcon goalImg = new ImageIcon("data/abilities/goal.png");
JLabel goal = new JLabel("",goalImg,JLabel.CENTER);
goal.setBounds(0,0,100,460);
panel.add(goal);
// Goal enlargement ability title
JLabel goalTitle = new JLabel("Big net");
goalTitle.setFont(new Font("MV Boli", Font.BOLD,25));
goalTitle.setBounds(100,200,150,50);
goalTitle.setForeground(Color.BLACK);
panel.add(goalTitle);
// Basketball ability icon
ImageIcon basketBallImg = new ImageIcon("data/abilities/basketball.png");
JLabel basketBall = new JLabel("",basketBallImg,JLabel.CENTER);
basketBall.setBounds(0,0,100,640);
panel.add(basketBall);
// Basketball ability title
JLabel basketballTitle = new JLabel("Basketball");
basketballTitle.setFont(new Font("MV Boli", Font.BOLD,25));
basketballTitle.setBounds(100,275,150,50);
basketballTitle.setForeground(Color.orange);
panel.add(basketballTitle);
// Freeze ability icon
ImageIcon iceImg = new ImageIcon("data/abilities/ice.png");
JLabel ice = new JLabel("",iceImg,JLabel.CENTER);
ice.setBounds(0,0,700,100);
panel.add(ice);
// Freeze ability title
JLabel iceTitle = new JLabel("Freeze");
iceTitle.setFont(new Font("MV Boli", Font.BOLD,25));
iceTitle.setBounds(425,25,150,50);
iceTitle.setForeground(Color.CYAN);
panel.add(iceTitle);
// Portal ability icon
ImageIcon portalImg = new ImageIcon("data/abilities/portal.png");
JLabel portal = new JLabel("",portalImg,JLabel.CENTER);
portal.setBounds(0,0,700,350);
panel.add(portal);
// Portal ability title
JLabel portalTitle = new JLabel("Portal");
portalTitle.setFont(new Font("MV Boli", Font.BOLD,25));
portalTitle.setBounds(425,150,150,50);
portalTitle.setForeground(Color.DARK_GRAY);
panel.add(portalTitle);
// Ball frenzy ability icon
ImageIcon frenzyImg = new ImageIcon("data/abilities/frenzy.png");
JLabel frenzy = new JLabel("",frenzyImg,JLabel.CENTER);
frenzy.setBounds(0,0,700,600);
panel.add(frenzy);
// Ball frenzy ability title
JLabel frenzyTitle = new JLabel("Ball frenzy");
frenzyTitle.setFont(new Font("MV Boli", Font.BOLD,25));
frenzyTitle.setBounds(425,275,150,50);
frenzyTitle.setForeground(Color.MAGENTA);
panel.add(frenzyTitle);
frame.add(panel);
frame.setVisible(true);
}
}