diff options
Diffstat (limited to 'src/main/java')
-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; |