diff options
author | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2020-07-10 18:35:04 +0300 |
---|---|---|
committer | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2020-07-10 18:35:04 +0300 |
commit | 3b1698a72659efe8a243c70833df81366174e62a (patch) | |
tree | 4092accca774a160e320fb95cdfeda2d95b3f1bc | |
parent | 1c2f28143a4050f7b76a11d5e16e859035e24e29 (diff) | |
download | LibGui-3b1698a72659efe8a243c70833df81366174e62a.tar.gz LibGui-3b1698a72659efe8a243c70833df81366174e62a.tar.bz2 LibGui-3b1698a72659efe8a243c70833df81366174e62a.zip |
Add WTiledSprite.setTileWidth/Height and docs for getters and setters
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/widget/WTiledSprite.java | 36 |
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) { |