add settings to hud modules
This commit is contained in:
parent
90347f7476
commit
e5d1d3ef73
7 changed files with 119 additions and 3 deletions
|
@ -4,6 +4,7 @@ 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.util.Identifier;
|
||||
|
||||
public class ModuleButton
|
||||
{
|
||||
|
@ -23,6 +24,7 @@ public class ModuleButton
|
|||
this.y = y;
|
||||
drawContext.fill(x, y, x + width, y + height, hovered(mouseX, mouseY) ? 0xFF333333 : 0xFF222222);
|
||||
drawContext.drawText(textRenderer, module.name, x+2, y+2, module.enabled ? 0x55FFFF : 0xFFFFFF, false);
|
||||
if (!module.settings.isEmpty()) drawContext.drawGuiTexture(Identifier.of("moonlight", "settings"), x+width-12, y, 12, 12);
|
||||
}
|
||||
|
||||
public boolean hovered(int mouseX, int mouseY)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue