add new files
This commit is contained in:
parent
4e90a93d68
commit
8038516a66
65 changed files with 7996 additions and 0 deletions
46
java/src/game/gui/element/Fill.java
Normal file
46
java/src/game/gui/element/Fill.java
Normal file
|
@ -0,0 +1,46 @@
|
|||
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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue