package info.u_team.u_team_core.gui.elements;

import org.lwjgl.opengl.GL11;

import com.mojang.blaze3d.systems.RenderSystem;

import info.u_team.u_team_core.util.RGBA;

public class ActiveButton extends UButton {
	
	protected boolean active;
	
	protected RGBA activeColor;
	
	public ActiveButton(int x, int y, int width, int height, String displayString, int activeColor) {
		this(x, y, width, height, displayString, activeColor, EMTPY_PRESSABLE);
	}
	
	public ActiveButton(int x, int y, int width, int height, String displayString, int activeColor, IPressable pressable) {
		super(x, y, width, height, displayString, pressable);
		this.activeColor = new RGBA(activeColor);
	}
	
	public RGBA getActiveColorRGBA() {
		return activeColor;
	}
	
	public void setActiveColorRGBA(RGBA activeColor) {
		this.activeColor = activeColor;
	}
	
	public boolean isActive() {
		return active;
	}
	
	public void setActive(boolean active) {
		this.active = active;
	}
	
	@Override
	public void renderButton(int mouseX, int mouseY, float partial) {
		RenderSystem.color4f(1, 1, 1, 1);
		if (active) {
			activeColor.glColor();
		}
		super.renderButton(mouseX, mouseY, partial);
		GL11.glColor4f(1, 1, 1, 1);
	}
}

@@ -71,16 +71,62 @@
 .GL11;%0A%0A
+import com.mojang.blaze3d.matrix.MatrixStack;%0A
 import c
@@ -207,16 +207,63 @@
 il.RGBA;
+%0Aimport net.minecraft.util.text.ITextComponent;
 %0A%0Apublic
@@ -416,38 +416,46 @@
 int height, 
-String
+ITextComponent
  display
 String, int 
@@ -434,38 +434,32 @@
 omponent display
-String
 , int activeColo
@@ -498,22 +498,16 @@
  display
-String
 , active
@@ -598,22 +598,30 @@
 ht, 
-String
+ITextComponent
  display
 Stri
@@ -616,22 +616,16 @@
  display
-String
 , int ac
@@ -699,14 +699,8 @@
 play
-String
 , pr
@@ -1057,29 +1057,56 @@
 ic void 
-renderButton(
+func_230431_b_(MatrixStack matrixStack, 
 int mous
@@ -1232,21 +1232,36 @@
 per.
-renderButton(
+func_230431_b_(matrixStack, 
 mous

Update active button