47 lines
985 B
Java
47 lines
985 B
Java
![]() |
package game.gui.element;
|
||
|
|
||
|
public class Fill extends Element {
|
||
|
private final boolean left;
|
||
|
private final boolean top;
|
||
|
|
||
|
public Fill(int x, int y, int w, int h, String text, boolean top, boolean left) {
|
||
|
super(x, y, w, h, null);
|
||
|
this.top = top;
|
||
|
this.left = left;
|
||
|
this.setText(text);
|
||
|
}
|
||
|
|
||
|
public Fill(int x, int y, int w, int h, String text, boolean left) {
|
||
|
this(x, y, w, h, text, false, left);
|
||
|
}
|
||
|
|
||
|
public Fill(int x, int y, int w, int h, String text) {
|
||
|
this(x, y, w, h, text, false, false);
|
||
|
}
|
||
|
|
||
|
public Fill(int x, int y, int w, int h, boolean top, boolean left) {
|
||
|
this(x, y, w, h, "", top, left);
|
||
|
}
|
||
|
|
||
|
public Fill(int x, int y, int w, int h, boolean left) {
|
||
|
this(x, y, w, h, "", false, left);
|
||
|
}
|
||
|
|
||
|
public Fill(int x, int y, int w, int h) {
|
||
|
this(x, y, w, h, "", false, false);
|
||
|
}
|
||
|
|
||
|
|
||
|
public boolean canHover() {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
protected boolean isTextCenteredX() {
|
||
|
return !this.left;
|
||
|
}
|
||
|
|
||
|
protected boolean isTextCenteredY() {
|
||
|
return !this.top;
|
||
|
}
|
||
|
}
|