aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJuuxel <6596629+Juuxel@users.noreply.github.com>2019-12-15 18:25:43 +0200
committerJuuxel <6596629+Juuxel@users.noreply.github.com>2019-12-15 18:25:43 +0200
commit6bdc91ce80b7379605e15338e8a59ca482f8b828 (patch)
tree6e3ae15a51fcffb1ed470608cfaa6156cce4a87b /src
parente48d1cee97d1790908bea17a97eca20bab7cf2f1 (diff)
downloadLibGui-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.java5
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;
}