From 3b1698a72659efe8a243c70833df81366174e62a Mon Sep 17 00:00:00 2001 From: Juuxel <6596629+Juuxel@users.noreply.github.com> Date: Fri, 10 Jul 2020 18:35:04 +0300 Subject: Add WTiledSprite.setTileWidth/Height and docs for getters and setters --- .../cottonmc/cotton/gui/widget/WTiledSprite.java | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) 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) { -- cgit