diff options
author | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2019-12-15 18:25:43 +0200 |
---|---|---|
committer | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2019-12-15 18:25:43 +0200 |
commit | 6bdc91ce80b7379605e15338e8a59ca482f8b828 (patch) | |
tree | 6e3ae15a51fcffb1ed470608cfaa6156cce4a87b /src | |
parent | e48d1cee97d1790908bea17a97eca20bab7cf2f1 (diff) | |
download | LibGui-6bdc91ce80b7379605e15338e8a59ca482f8b828.tar.gz LibGui-6bdc91ce80b7379605e15338e8a59ca482f8b828.tar.bz2 LibGui-6bdc91ce80b7379605e15338e8a59ca482f8b828.zip |
Add nullability annotations to WToggleButton.label-related code
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/widget/WToggleButton.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WToggleButton.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WToggleButton.java index e860a5f..4c75113 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WToggleButton.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WToggleButton.java @@ -21,7 +21,7 @@ public class WToggleButton extends WWidget { protected Identifier onImage; protected Identifier offImage; - protected Text label = null; + @Nullable protected Text label = null; protected boolean isOn = false; @Nullable protected Consumer<Boolean> onToggle = null; @@ -124,11 +124,12 @@ public class WToggleButton extends WWidget { return this; } + @Nullable public Text getLabel() { return label; } - public void setLabel(Text label) { + public void setLabel(@Nullable Text label) { this.label = label; } |