-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInstructionsScreen.java
47 lines (36 loc) · 1006 Bytes
/
InstructionsScreen.java
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
/*
* InstructionsScreen
* @author Ted Lim
* @date December 18
* @version
* This class loads the image for the instructions screen and draws the image
*/
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Rectangle;
import javax.swing.ImageIcon;
public class InstructionsScreen extends Screen{
private ImageIcon instrScreen;
private Rectangle backBox;
public InstructionsScreen() {
try {
instrScreen = new ImageIcon("resource/Instructions.png");
} catch (Exception e) {
//System.out.println("Error loading instructions screen");
e.printStackTrace();
}
backBox = new Rectangle(100, 40);
backBox.setLocation(1160, 660);
}
public void draw(Graphics g) {
g.drawImage(instrScreen.getImage(), 0, 0, null);
//g.setColor(Color.RED);
//g.fillRect(0, 0, 1280, 720);
}
public Rectangle getBackBox() {
return backBox;
}
public void setBackBox(Rectangle backBox) {
this.backBox = backBox;
}
}