A Pink button theme
-
MixinGuiButton
package net.ccbluex.liquidbounce.injection.forge.mixins.gui; import net.ccbluex.liquidbounce.ui.font.AWTFontRenderer; import net.ccbluex.liquidbounce.ui.font.Fonts; import net.ccbluex.liquidbounce.utils.render.RenderUtils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import org.spongepowered.asm.mixin.Shadow; import java.awt.*; @Mixin(GuiButton.class) @SideOnly(Side.CLIENT) public abstract class MixinGuiButton extends Gui { @Shadow public boolean visible; @Shadow public int xPosition; @Shadow public int yPosition; @Shadow public int width; @Shadow public int height; @Shadow protected boolean hovered; @Shadow public boolean enabled; @Shadow protected abstract void mouseDragged(Minecraft mc, int mouseX, int mouseY); @Shadow public String displayString; @Shadow @Final protected static ResourceLocation buttonTextures; private float cut; private float alpha; @Overwrite public void drawButton(Minecraft mc, int mouseX, int mouseY) { if (visible) { final FontRenderer fontRenderer = mc.getLanguageManager().isCurrentLocaleUnicode() ? mc.fontRendererObj : Fonts.font35; hovered = (mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height); final int delta = RenderUtils.deltaTime; if (enabled && hovered) { cut += 0.05F * delta; if (cut >= 4) cut = 4; alpha += 0.3F * delta; if (alpha >= 210) alpha = 210; } else { cut -= 0.05F * delta; if (cut <= 0) cut = 0; alpha -= 0.3F * delta; if (alpha <= 120) alpha = 120; } Gui.drawRect(this.xPosition + (int) this.cut, this.yPosition, this.xPosition + this.width - (int) this.cut, this.yPosition + this.height, this.enabled ? new Color(1F, 0.8F, 1F, this.alpha / 255F).getRGB() : new Color(1F, 0.7F, 1F, 1F).getRGB()); RenderUtils.drawBorderedRect(this.xPosition + (int) this.cut, this.yPosition, this.xPosition + this.width - (int) this.cut, this.yPosition + this.height,3F, new Color(255,200,255,255).getRGB(), new Color(255, 190, 255, 50).getRGB()); RenderUtils.drawBorderedRect(this.xPosition + (int) this.cut, this.yPosition, this.xPosition + this.width - (int) this.cut, this.yPosition + this.height,1F, new Color(30,30,30,180).getRGB(), new Color(255, 180, 255, 0).getRGB()); mc.getTextureManager().bindTexture(buttonTextures); mouseDragged(mc, mouseX, mouseY); AWTFontRenderer.Companion.setAssumeNonVolatile(true); fontRenderer.drawStringWithShadow(displayString, (float) ((this.xPosition + this.width / 2) - fontRenderer.getStringWidth(displayString) / 2), this.yPosition + (this.height - 5) / 2F, 14737632); AWTFontRenderer.Companion.setAssumeNonVolatile(false); GlStateManager.resetColor(); } } }
and MixinButtonExt
package net.ccbluex.liquidbounce.injection.forge.mixins.gui; import net.ccbluex.liquidbounce.ui.font.Fonts; import net.ccbluex.liquidbounce.utils.render.RenderUtils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.renderer.GlStateManager; import net.minecraftforge.fml.client.config.GuiButtonExt; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import java.awt.*; @Mixin(GuiButtonExt.class) @SideOnly(Side.CLIENT) public abstract class MixinGuiButtonExt extends GuiButton { private float cut; private float alpha; public MixinGuiButtonExt(int p_i1020_1_, int p_i1020_2_, int p_i1020_3_, String p_i1020_4_) { super(p_i1020_1_, p_i1020_2_, p_i1020_3_, p_i1020_4_); } public MixinGuiButtonExt(int p_i46323_1_, int p_i46323_2_, int p_i46323_3_, int p_i46323_4_, int p_i46323_5_, String p_i46323_6_) { super(p_i46323_1_, p_i46323_2_, p_i46323_3_, p_i46323_4_, p_i46323_5_, p_i46323_6_); } @Overwrite public void drawButton(Minecraft mc, int mouseX, int mouseY) { if (visible) { final FontRenderer fontRenderer = mc.getLanguageManager().isCurrentLocaleUnicode() ? mc.fontRendererObj : Fonts.font35; hovered = (mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height); final int delta = RenderUtils.deltaTime; if (enabled && hovered) { cut += 0.05F * delta; if (cut >= 4) cut = 4; alpha += 0.3F * delta; if (alpha >= 210) alpha = 210; } else { cut -= 0.05F * delta; if (cut <= 0) cut = 0; alpha -= 0.3F * delta; if (alpha <= 120) alpha = 120; } RenderUtils.drawCircleRect(this.xPosition + (int) this.cut, this.yPosition, this.xPosition + this.width - (int) this.cut, this.yPosition + this.height, 2f,this.enabled ? new Color(0F, 0F, 0F, this.alpha / 255F).getRGB() : new Color(0.5F, 0.5F, 0.5F, 0.5F).getRGB(),true); mc.getTextureManager().bindTexture(buttonTextures); mouseDragged(mc, mouseX, mouseY); fontRenderer.drawStringWithShadow(displayString, (float) ((this.xPosition + this.width / 2) - fontRenderer.getStringWidth(displayString) / 2), this.yPosition + (this.height - 5) / 2F, 14737632); GlStateManager.resetColor(); } } }
just copy it and replace️️