fuck you matrixstack nobody ever liked you anyway

This commit is contained in:
kawaiizenbo 2023-06-08 11:25:51 -07:00
parent 6e7d77dea3
commit f41e477e28
15 changed files with 65 additions and 69 deletions

View file

@ -4,7 +4,6 @@ import me.kawaiizenbo.moonlight.module.Module_;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.font.TextRenderer;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.util.math.MatrixStack;
public class ModuleButton
{
@ -21,11 +20,11 @@ public class ModuleButton
this.height = 14;
}
public void render(MatrixStack matrices, int mouseX, int mouseY)
public void render(DrawContext drawContext, int mouseX, int mouseY)
{
TextRenderer textRenderer = mc.textRenderer;
DrawContext.fill(matrices, x, y, x + width, y + height, hovered(mouseX, mouseY) ? 0xFF333333 : 0xFF222222);
textRenderer.draw(matrices, module.name, x+3, y+3, module.enabled ? 0x55FFFF : 0xFFFFFF);
drawContext.fill(x, y, x + width, y + height, hovered(mouseX, mouseY) ? 0xFF333333 : 0xFF222222);
drawContext.drawText(textRenderer, module.name, x+3, y+3, module.enabled ? 0x55FFFF : 0xFFFFFF, false);
}
public boolean hovered(int mouseX, int mouseY)