@@ -0,0 +1,1901 @@
+package info.u_team.u_team_core.gui.elements;%0A%0Aimport com.mojang.blaze3d.matrix.MatrixStack;%0A%0Aimport info.u_team.u_team_core.util.RGBA;%0Aimport net.minecraft.util.ResourceLocation;%0A%0Apublic class ImageToggleButton extends ImageButton %7B%0A%09%0A%09protected ResourceLocation toggleImage;%0A%09%0A%09protected RGBA toggleImageColor;%0A%09%0A%09protected boolean toggled;%0A%09%0A%09public ImageToggleButton(int x, int y, int width, int height, ResourceLocation image, ResourceLocation toggleImage, boolean toggled) %7B%0A%09%09this(x, y, width, height, image, toggleImage, toggled, EMTPY_PRESSABLE);%0A%09%7D%0A%09%0A%09public ImageToggleButton(int x, int y, int width, int height, ResourceLocation image, ResourceLocation toggleImage, boolean toggled, IPressable pessable) %7B%0A%09%09this(x, y, width, height, image, toggleImage, toggled, pessable, EMPTY_TOOLTIP);%0A%09%7D%0A%09%0A%09public ImageToggleButton(int x, int y, int width, int height, ResourceLocation image, ResourceLocation toggleImage, boolean toggled, ITooltip tooltip) %7B%0A%09%09this(x, y, width, height, image, toggleImage, toggled, EMTPY_PRESSABLE, tooltip);%0A%09%7D%0A%09%0A%09public ImageToggleButton(int x, int y, int width, int height, ResourceLocation image, ResourceLocation toggleImage, boolean toggled, IPressable pessable, ITooltip tooltip) %7B%0A%09%09super(x, y, width, height, image, pessable, tooltip);%0A%09%09this.toggleImage = toggleImage;%0A%09%09toggleImageColor = WHITE;%0A%09%09this.toggled = toggled;%0A%09%7D%0A%09%0A%09public boolean isToggled() %7B%0A%09%09return toggled;%0A%09%7D%0A%09%0A%09public void setToggled(boolean toggled) %7B%0A%09%09this.toggled = toggled;%0A%09%7D%0A%09%0A%09public void toggle() %7B%0A%09%09toggled = !toggled;%0A%09%7D%0A%09%0A%09@Override%0A%09public void onPress() %7B%0A%09%09toggle();%0A%09%09super.onPress();%0A%09%7D%0A%09%0A%09@Override%0A%09protected ResourceLocation getCurrentImage() %7B%0A%09%09return toggled ? toggleImage : image;%0A%09%7D%0A%09%0A%09@Override%0A%09protected RGBA getCurrentImageColor(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) %7B%0A%09%09return toggled ? toggleImageColor : imageColor;%0A%09%7D%0A%7D%0A

Add image toggle button