mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Fix ExtendedButton not being highlighted when focused (#9144)
This commit is contained in:
1 parent
e9ea4ca169
commit
4b494451db
2 files changed
+2
-2
No files matched your search
@@ -40,7 +40,7 @@ public class ExtendedButton extends Button
|
||||
public void renderButton(PoseStack poseStack, int mouseX, int mouseY, float partialTick)
|
||||
{
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
int k = this.getYImage(this.isHovered);
|
||||
int k = this.getYImage(this.isHoveredOrFocused());
|
||||
ScreenUtils.blitWithBorder(poseStack, WIDGETS_LOCATION, this.getX(), this.getY(), 0, 46 + k * 20, this.width, this.height, 200, 20, 2, 3, 2, 2, this.getBlitOffset());
|
||||
this.renderBg(poseStack, mc, mouseX, mouseY);
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ public class UnicodeGlyphButton extends ExtendedButton
|
||||
{
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
this.isHovered = mouseX >= this.getX() && mouseY >= this.getY() && mouseX < this.getX() + this.width && mouseY < this.getY() + this.height;
|
||||
int k = this.getYImage(this.isHovered);
|
||||
int k = this.getYImage(this.isHoveredOrFocused());
|
||||
ScreenUtils.blitWithBorder(poseStack, WIDGETS_LOCATION, this.getX(), this.getY(), 0, 46 + k * 20, this.width, this.height, 200, 20, 2, 3, 2, 2, this.getBlitOffset());
|
||||
this.renderBg(poseStack, mc, mouseX, mouseY);
|
||||
|
||||
|
||||
Reference in new issue
Block a user