Skip to content

Commit 9ea13a0

Browse files
committed
added height, width getters
1 parent 151eec5 commit 9ea13a0

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/main/java/net/raccoon/will/structura/api/gui/element/AbstractElement.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ private boolean areCoordinatesInRectangle(double x, double y) {
8181
return x >= (double)this.getX() && y >= (double)this.getY() && x < (double)this.getRight() && y < (double)this.getBottom();
8282
}
8383

84+
public int getWidth() {
85+
return this.width;
86+
}
87+
88+
public int getHeight() {
89+
return this.height;
90+
}
91+
8492
public boolean isMouseOver(double mouseX, double mouseY) {
8593
return this.isActive() && this.areCoordinatesInRectangle(mouseX, mouseY);
8694
}

0 commit comments

Comments
 (0)