aboutsummaryrefslogtreecommitdiff
path: root/src/client/java/dev/isxander/yacl
diff options
context:
space:
mode:
authorisXander <xandersmith2008@gmail.com>2023-02-22 21:43:35 +0000
committerisXander <xandersmith2008@gmail.com>2023-02-22 21:43:35 +0000
commit19573b50098696028bdb9c7df941ce9ea2628523 (patch)
treec4e80480bcfa562720c879c5b7ac75ae78cadd7e /src/client/java/dev/isxander/yacl
parent0a186449138656318eae4c0aa3b0e6348c44f0cc (diff)
downloadYetAnotherConfigLib-19573b50098696028bdb9c7df941ce9ea2628523.tar.gz
YetAnotherConfigLib-19573b50098696028bdb9c7df941ce9ea2628523.tar.bz2
YetAnotherConfigLib-19573b50098696028bdb9c7df941ce9ea2628523.zip
1.19.4-pre1
Diffstat (limited to 'src/client/java/dev/isxander/yacl')
-rw-r--r--src/client/java/dev/isxander/yacl/gui/LowProfileButtonWidget.java6
-rw-r--r--src/client/java/dev/isxander/yacl/gui/TextScaledButtonWidget.java3
2 files changed, 4 insertions, 5 deletions
diff --git a/src/client/java/dev/isxander/yacl/gui/LowProfileButtonWidget.java b/src/client/java/dev/isxander/yacl/gui/LowProfileButtonWidget.java
index 15257e3..7e17aac 100644
--- a/src/client/java/dev/isxander/yacl/gui/LowProfileButtonWidget.java
+++ b/src/client/java/dev/isxander/yacl/gui/LowProfileButtonWidget.java
@@ -18,12 +18,12 @@ public class LowProfileButtonWidget extends Button {
}
@Override
- public void renderButton(PoseStack matrices, int mouseX, int mouseY) {
+ public void renderWidget(PoseStack matrices, int mouseX, int mouseY, float deltaTicks) {
if (!isHoveredOrFocused() || !active) {
int j = this.active ? 0xFFFFFF : 0xA0A0A0;
- this.renderString(matrices, Minecraft.getInstance().font, this.getX() + this.width / 2, this.getY() + (this.height - 8) / 2, j);
+ this.renderString(matrices, Minecraft.getInstance().font, j);
} else {
- super.renderButton(matrices, mouseX, mouseY);
+ super.renderWidget(matrices, mouseX, mouseY, deltaTicks);
}
}
}
diff --git a/src/client/java/dev/isxander/yacl/gui/TextScaledButtonWidget.java b/src/client/java/dev/isxander/yacl/gui/TextScaledButtonWidget.java
index e52174a..b955912 100644
--- a/src/client/java/dev/isxander/yacl/gui/TextScaledButtonWidget.java
+++ b/src/client/java/dev/isxander/yacl/gui/TextScaledButtonWidget.java
@@ -6,7 +6,6 @@ import net.minecraft.client.gui.Font;
import net.minecraft.client.gui.components.Button;
import net.minecraft.client.gui.components.Tooltip;
import net.minecraft.network.chat.Component;
-import net.minecraft.util.FormattedCharSequence;
import net.minecraft.util.Mth;
public class TextScaledButtonWidget extends Button {
@@ -23,7 +22,7 @@ public class TextScaledButtonWidget extends Button {
}
@Override
- public void renderString(PoseStack matrices, Font textRenderer, int x, int y, int color) {
+ public void renderString(PoseStack matrices, Font textRenderer, int color) {
Font font = Minecraft.getInstance().font;
matrices.pushPose();