diff options
| author | Unknown <shekwancheung0528@gmail.com> | 2019-04-13 15:40:23 +0800 |
|---|---|---|
| committer | Unknown <shekwancheung0528@gmail.com> | 2019-04-13 15:40:23 +0800 |
| commit | 2570a35b35ec29b6677e318f2bf3d5b6640bf106 (patch) | |
| tree | 28a69c3180b5f875cb931b154ee3718d96067e17 /src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java | |
| parent | 41998600e53f941554c8d73790180c13a2e5663c (diff) | |
| download | RoughlyEnoughItems-2570a35b35ec29b6677e318f2bf3d5b6640bf106.tar.gz RoughlyEnoughItems-2570a35b35ec29b6677e318f2bf3d5b6640bf106.tar.bz2 RoughlyEnoughItems-2570a35b35ec29b6677e318f2bf3d5b6640bf106.zip | |
v2.7.3 Bug fixes
Fix #56
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java index f1a3d41b1..03c8a0b96 100644 --- a/src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java +++ b/src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java @@ -3,7 +3,6 @@ package me.shedaniel.rei.gui.widget; import com.mojang.blaze3d.platform.GlStateManager; import me.shedaniel.rei.client.ScreenHelper; import net.minecraft.client.audio.PositionedSoundInstance; -import net.minecraft.client.font.TextRenderer; import net.minecraft.client.gui.Element; import net.minecraft.client.gui.widget.AbstractButtonWidget; import net.minecraft.sound.SoundEvents; @@ -58,7 +57,6 @@ public abstract class ButtonWidget extends HighlightableWidget { @Override public void render(int mouseX, int mouseY, float delta) { int x = bounds.x, y = bounds.y, width = bounds.width, height = bounds.height; - TextRenderer textRenderer = minecraft.textRenderer; minecraft.getTextureManager().bindTexture(AbstractButtonWidget.WIDGETS_LOCATION); GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); int textureOffset = this.getTextureId(isHovered(mouseX, mouseY)); @@ -87,7 +85,7 @@ public abstract class ButtonWidget extends HighlightableWidget { colour = 16777120; } - this.drawCenteredString(textRenderer, this.text, x + width / 2, y + (height - 8) / 2, colour); + this.drawCenteredString(font, text, x + width / 2, y + (height - 8) / 2, colour); if (getTooltips().isPresent()) if (!focused && isHighlighted(mouseX, mouseY)) |
