Metroids/Game/src/Button.java

51 lines
1.0 KiB
Java
Raw Normal View History

import org.lwjgl.util.Rectangle;
import java.awt.Font;
import org.newdawn.slick.Color;
import org.newdawn.slick.TrueTypeFont;
public class Button{
private boolean isClicked;
private String name;
Rectangle bounds = new Rectangle();
private TrueTypeFont font;
public Button(float loc, String name) {
super();
this.name = name;
this.isClicked = false;
bounds.setX(50);
bounds.setY((int) ((loc * 50) - 15));
bounds.setHeight(30);
bounds.setWidth(100);
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public boolean isClicked() {
return isClicked;
}
public void setClicked(boolean isClicked) {
this.isClicked = isClicked;
}
public Rectangle getBounds() {
return bounds;
}
public void setBounds(Rectangle bounds) {
this.bounds = bounds;
}
public TrueTypeFont getFont() {
return font;
}
public void setFont(TrueTypeFont font) {
this.font = font;
}
public void init(String name) {
}
}