aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WTiledSprite.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WTiledSprite.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WTiledSprite.java
index 5ef49ab..516c876 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WTiledSprite.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WTiledSprite.java
@@ -52,14 +52,50 @@ public class WTiledSprite extends WSprite {
tileHeight = height;
}
+ /**
+ * Gets the tile width of this sprite.
+ *
+ * @return the tile width
+ * @since 2.2.0
+ */
public int getTileWidth() {
return tileWidth;
}
+ /**
+ * Gets the tile height of this sprite.
+ *
+ * @return the tile height
+ * @since 2.2.0
+ */
public int getTileHeight() {
return tileHeight;
}
+ /**
+ * Sets the tile width of this sprite.
+ *
+ * @param tileWidth the new tile width
+ * @return this sprite
+ * @since 2.2.0
+ */
+ public WTiledSprite setTileWidth(int tileWidth) {
+ this.tileWidth = tileWidth;
+ return this;
+ }
+
+ /**
+ * Sets the tile height of this sprite.
+ *
+ * @param tileHeight the new tile height
+ * @return this sprite
+ * @since 2.2.0
+ */
+ public WTiledSprite setTileHeight(int tileHeight) {
+ this.tileHeight = tileHeight;
+ return this;
+ }
+
@Environment(EnvType.CLIENT)
@Override
public void paintFrame(int x, int y, Identifier texture) {