-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIcon.java
More file actions
36 lines (28 loc) · 734 Bytes
/
Icon.java
File metadata and controls
36 lines (28 loc) · 734 Bytes
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
package playerObjects;
import org.newdawn.slick.Image;
import org.newdawn.slick.geom.Vector2f;
import org.newdawn.slick.opengl.Texture;
public class Icon {
private Texture t1;
//This is the image shown on the icon
private Image design;
//This is the size of the image in pixels
private Vector2f sizeP;
//establishes the fields to values. (Image size should be in Pixels)
public Icon(Image i, Vector2f s) {
Texture t1 = i.getTexture();
design = i;
sizeP = s;
}
public Icon(Vector2f s) {
sizeP = s;
}
//This returns the image
public Image getDesign() {
return design;
}
//Returns the size of the image in pixels
public Vector2f getSize() {
return sizeP;
}
}