h
This commit is contained in:
parent
3de1c7130a
commit
e5b783553b
10 changed files with 56 additions and 31 deletions
|
@ -9,13 +9,14 @@ public class Setting
|
|||
{
|
||||
public String name;
|
||||
protected TextRenderer textRenderer = MinecraftClient.getInstance().textRenderer;
|
||||
public int height = 24;
|
||||
|
||||
int x = 0, y = 0;
|
||||
public void render(MatrixStack matrices, int x, int y, int mouseX, int mouseY)
|
||||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
DrawableHelper.fill(matrices, x, y, x+192, y+24, hovered(mouseX, mouseY) ? 0xFF444444: 0xFF222222);
|
||||
DrawableHelper.fill(matrices, x, y, x+192, y+height, hovered(mouseX, mouseY) ? 0xFF444444: 0xFF222222);
|
||||
|
||||
}
|
||||
|
||||
|
@ -27,6 +28,6 @@ public class Setting
|
|||
|
||||
protected boolean hovered(int mouseX, int mouseY)
|
||||
{
|
||||
return mouseX >= x && mouseX <= x + 192 && mouseY >= y && mouseY <= y + 24;
|
||||
return mouseX >= x && mouseX <= x + 192 && mouseY >= y && mouseY <= y + height;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue