diff options
Diffstat (limited to 'src/main/java/dev/isxander/yacl/gui/LowProfileButtonWidget.java')
-rw-r--r-- | src/main/java/dev/isxander/yacl/gui/LowProfileButtonWidget.java | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/main/java/dev/isxander/yacl/gui/LowProfileButtonWidget.java b/src/main/java/dev/isxander/yacl/gui/LowProfileButtonWidget.java deleted file mode 100644 index 4823428..0000000 --- a/src/main/java/dev/isxander/yacl/gui/LowProfileButtonWidget.java +++ /dev/null @@ -1,29 +0,0 @@ -package dev.isxander.yacl.gui; - -import net.minecraft.client.MinecraftClient; -import net.minecraft.client.gui.tooltip.Tooltip; -import net.minecraft.client.gui.widget.ButtonWidget; -import net.minecraft.client.util.math.MatrixStack; -import net.minecraft.text.Text; -import net.minecraft.util.math.MathHelper; - -public class LowProfileButtonWidget extends ButtonWidget { - public LowProfileButtonWidget(int x, int y, int width, int height, Text message, PressAction onPress) { - super(x, y, width, height, message, onPress, ButtonWidget.DEFAULT_NARRATION_SUPPLIER); - } - - public LowProfileButtonWidget(int x, int y, int width, int height, Text message, PressAction onPress, Tooltip tooltip) { - this(x, y, width, height, message, onPress); - setTooltip(tooltip); - } - - @Override - public void renderButton(MatrixStack matrices, int mouseX, int mouseY, float delta) { - if (!isHovered()) { - int j = this.active ? 0xFFFFFF : 0xA0A0A0; - drawCenteredText(matrices, MinecraftClient.getInstance().textRenderer, this.getMessage(), this.getX() + this.width / 2, this.getY() + (this.height - 8) / 2, j | MathHelper.ceil(this.alpha * 255.0F) << 24); - } else { - super.renderButton(matrices, mouseX, mouseY, delta); - } - } -} |