mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +01:00
Update TexturedButton.java
This commit is contained in:
parent
c2bcbfe56f
commit
f3efa570a4
1 changed files with 8 additions and 11 deletions
|
@ -45,10 +45,8 @@ public class TexturedButton extends Button {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) {
|
public void renderWidget(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) {
|
||||||
if (this.visible) {
|
|
||||||
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
|
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
this.isHovered = mouseX >= this.getX() && mouseY >= this.getY() && mouseX < this.getX() + this.width && mouseY < this.getY() + this.height;
|
|
||||||
int k = this.isHovered
|
int k = this.isHovered
|
||||||
? 1
|
? 1
|
||||||
: 0;
|
: 0;
|
||||||
|
@ -59,7 +57,6 @@ public class TexturedButton extends Button {
|
||||||
guiGraphics.blit(this.resLoc, this.getX(), this.getY(), this.texturePosX, this.texturePosY - this.height + k * this.height, this.width, this.height);
|
guiGraphics.blit(this.resLoc, this.getX(), this.getY(), this.texturePosX, this.texturePosY - this.height + k * this.height, this.width, this.height);
|
||||||
// this.mouseDragged(minecraft, x, y);
|
// this.mouseDragged(minecraft, x, y);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void drawHover(GuiGraphics guiGraphics, int x, int y) {
|
public void drawHover(GuiGraphics guiGraphics, int x, int y) {
|
||||||
if (this.isMouseOver(x, y)) {
|
if (this.isMouseOver(x, y)) {
|
||||||
|
|
Loading…
Reference in a new issue