@@ -0,0 +1,2313 @@
+package info.u_team.u_team_core.gui.elements;%0A%0Aimport com.mojang.blaze3d.matrix.MatrixStack;%0A%0Aimport info.u_team.u_team_core.api.gui.*;%0Aimport net.minecraft.client.Minecraft;%0Aimport net.minecraft.client.gui.FontRenderer;%0Aimport net.minecraft.util.text.ITextComponent;%0A%0Apublic class ScalableCheckboxButton extends CheckboxButton implements IScaleable, IScaleProvider %7B%0A%09%0A%09protected float scale;%0A%09%0A%09public ScalableCheckboxButton(int x, int y, int width, int height, ITextComponent text, boolean checked, boolean drawText, float scale) %7B%0A%09%09this(x, y, width, height, text, checked, drawText, scale, EMTPY_PRESSABLE);%0A%09%7D%0A%09%0A%09public ScalableCheckboxButton(int x, int y, int width, int height, ITextComponent text, boolean checked, boolean drawText, float scale, IPressable pessable) %7B%0A%09%09this(x, y, width, height, text, checked, drawText, scale, pessable, EMPTY_TOOLTIP);%0A%09%7D%0A%09%0A%09public ScalableCheckboxButton(int x, int y, int width, int height, ITextComponent text, boolean checked, boolean drawText, float scale, ITooltip tooltip) %7B%0A%09%09this(x, y, width, height, text, checked, drawText, scale, EMTPY_PRESSABLE, tooltip);%0A%09%7D%0A%09%0A%09public ScalableCheckboxButton(int x, int y, int width, int height, ITextComponent text, boolean checked, boolean drawText, float scale, IPressable pessable, ITooltip tooltip) %7B%0A%09%09super(x, y, width, height, text, checked, drawText, pessable, tooltip);%0A%09%09this.scale = scale;%0A%09%7D%0A%09%0A%09@Override%0A%09public float getScale() %7B%0A%09%09return scale;%0A%09%7D%0A%09%0A%09@Override%0A%09public void setScale(float scale) %7B%0A%09%09this.scale = scale;%0A%09%7D%0A%09%0A%09@Override%0A%09public void renderForeground(MatrixStack matrixStack, Minecraft minecraft, int mouseX, int mouseY, float partialTicks) %7B%0A%09%09if (drawText) %7B%0A%09%09%09final FontRenderer fontRenderer = minecraft.fontRenderer;%0A%09%09%09%0A%09%09%09final float positionFactor = 1 / scale;%0A%09%09%09%0A%09%09%09final float xStart = (x + 24) * positionFactor;%0A%09%09%09final float yStart = (y + ((int) (height - 8 * scale)) / 2) * positionFactor;%0A%09%09%09%0A%09%09%09matrixStack.push();%0A%09%09%09matrixStack.scale(scale, scale, 0);%0A%09%09%09fontRenderer.func_243246_a(matrixStack, getCurrentText(), xStart, yStart, getCurrentTextColor(matrixStack, mouseX, mouseY, partialTicks).getColorARGB());%0A%09%09%09matrixStack.pop();%0A%09%09%7D%0A%09%7D%0A%09%0A%09@Override%0A%09public float getCurrentScale(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) %7B%0A%09%09return scale;%0A%09%7D%0A%7D%0A

Add scalable checkbox button