diff options
author | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2019-12-15 18:23:29 +0200 |
---|---|---|
committer | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2019-12-15 18:23:29 +0200 |
commit | e48d1cee97d1790908bea17a97eca20bab7cf2f1 (patch) | |
tree | 4d06b2f01a03bde4fd4fae02dfb4b441203f5f68 /src | |
parent | 0ddb69f5d3061645c0b45441f1ef5e02782321e5 (diff) | |
download | LibGui-e48d1cee97d1790908bea17a97eca20bab7cf2f1.tar.gz LibGui-e48d1cee97d1790908bea17a97eca20bab7cf2f1.tar.bz2 LibGui-e48d1cee97d1790908bea17a97eca20bab7cf2f1.zip |
Add getter/setter for button label and alignment
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java | 16 |
1 files changed, 14 insertions, 2 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 1064117..9addb22 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 @@ -30,7 +30,6 @@ public class WButton extends WWidget { return true; } - @Override public void paintBackground(int x, int y, int mouseX, int mouseY) { boolean hovered = (mouseX>=0 && mouseY>=0 && mouseX<getWidth() && mouseY<getHeight()); @@ -92,7 +91,20 @@ public class WButton extends WWidget { this.enabled = enabled; return this; } - + + public Text getLabel() { + return label; + } + + public WButton setLabel(Text label) { + this.label = label; + return this; + } + + public Alignment getAlignment() { + return alignment; + } + public WButton setAlignment(Alignment alignment) { this.alignment = alignment; return this; |