repair old modules, get ready for stringsetting
This commit is contained in:
parent
430ff443a6
commit
72eb688172
5 changed files with 22 additions and 52 deletions
|
@ -6,14 +6,13 @@ import net.minecraft.client.gui.DrawContext;
|
|||
public class Setting
|
||||
{
|
||||
public String name;
|
||||
public int height = 24;
|
||||
|
||||
int x = 0, y = 0;
|
||||
public void render(DrawContext drawContext, int x, int y, int mouseX, int mouseY, TextRenderer textRenderer)
|
||||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
drawContext.fill(x, y, x+192, y+height, hovered(mouseX, mouseY) ? 0xFF444444: 0xFF222222);
|
||||
drawContext.fill(x, y, x+192, y+24, hovered(mouseX, mouseY) ? 0xFF444444: 0xFF222222);
|
||||
|
||||
}
|
||||
|
||||
|
@ -25,6 +24,6 @@ public class Setting
|
|||
|
||||
protected boolean hovered(int mouseX, int mouseY)
|
||||
{
|
||||
return mouseX >= x && mouseX <= x + 192 && mouseY >= y && mouseY <= y + height;
|
||||
return mouseX >= x && mouseX <= x + 192 && mouseY >= y && mouseY <= y + 24;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue