diff options
author | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2020-07-10 18:44:06 +0300 |
---|---|---|
committer | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2020-07-10 18:44:06 +0300 |
commit | 7c7e8d9b5415871f242fb82ec10f88db6ad2a90a (patch) | |
tree | 305a09dcb1929129184cf23ec50cb46cc3dd197d /src/main/java/io | |
parent | 5a9689725d461d710cc25dc44828030752ce316f (diff) | |
download | LibGui-7c7e8d9b5415871f242fb82ec10f88db6ad2a90a.tar.gz LibGui-7c7e8d9b5415871f242fb82ec10f88db6ad2a90a.tar.bz2 LibGui-7c7e8d9b5415871f242fb82ec10f88db6ad2a90a.zip |
Add since tags and a package-info for the icon package
Diffstat (limited to 'src/main/java/io')
3 files changed, 17 insertions, 0 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java index 18da1e4..f65b513 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java @@ -56,6 +56,7 @@ public class WButton extends WWidget { * * @param icon the icon * @param label the label + * @since 2.2.0 */ public WButton(Icon icon, StringRenderable label) { this.icon = icon; diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/icon/TextureIcon.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/icon/TextureIcon.java index e614e4b..0fec0fa 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/icon/TextureIcon.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/icon/TextureIcon.java @@ -8,6 +8,8 @@ import net.minecraft.util.Identifier; /** * An icon that draws a texture. + * + * @since 2.2.0 */ public class TextureIcon implements Icon { private final Identifier texture; diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/icon/package-info.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/icon/package-info.java new file mode 100644 index 0000000..54bbc92 --- /dev/null +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/icon/package-info.java @@ -0,0 +1,14 @@ +/** + * The icon API for displaying various icons on widgets. + * + * <p>For example, you can attach an icon to a button: + * <pre> + * {@code + * // This is a button with an apple item as the icon: + * WButton button = new WButton(new ItemIcon(new ItemStack(Items.APPLE)), new LiteralText("Apple button")); + * } + * </pre> + * + * @since 2.2.0 + */ +package io.github.cottonmc.cotton.gui.widget.icon; |