update for guicolor

This commit is contained in:
S-B99 2019-11-11 15:53:53 -05:00
parent 30c89ac888
commit 0843e260d2
1 changed files with 18 additions and 15 deletions

View File

@ -4,8 +4,10 @@ import me.zeroeightsix.kami.gui.kami.RenderHelper;
import me.zeroeightsix.kami.gui.kami.component.SettingsPanel;
import me.zeroeightsix.kami.gui.rgui.render.AbstractComponentUI;
import me.zeroeightsix.kami.gui.rgui.render.font.FontRenderer;
import me.zeroeightsix.kami.module.ModuleManager;
import me.zeroeightsix.kami.module.modules.sdashb.experimental.GUIColor;
import static org.lwjgl.opengl.GL11.*;
import org.lwjgl.opengl.GL11;
/**
* Created by 086 on 16/12/2017.
@ -15,20 +17,21 @@ public class KamiSettingsPanelUI extends AbstractComponentUI<SettingsPanel> {
@Override
public void renderComponent(SettingsPanel component, FontRenderer fontRenderer) {
super.renderComponent(component, fontRenderer);
// glLineWidth(2);
// glColor3f(.59f,.05f,.11f);
// glBegin(GL_LINES);
// {
// glVertex2d(0,component.getHeight());
// glVertex2d(component.getWidth(),component.getHeight());
// }
// glEnd();
glLineWidth(2f);
glColor4f(.17f,.17f,.18f,.9f);
RenderHelper.drawFilledRectangle(0,0,component.getWidth(),component.getHeight());
glColor3f(.59f,.05f,.11f);
glLineWidth(1.5f);
RenderHelper.drawRectangle(0,0,component.getWidth(),component.getHeight());
GL11.glLineWidth(2.0F);
float red = (float)(Integer)((GUIColor)ModuleManager.getModuleByName("GUI Color")).red.getValue() / 255.0F;
float green = (float)(Integer)((GUIColor)ModuleManager.getModuleByName("GUI Color")).green.getValue() / 255.0F;
float blue = (float)(Integer)((GUIColor)ModuleManager.getModuleByName("GUI Color")).blue.getValue() / 255.0F;
float alpha = (float)(Integer)((GUIColor)ModuleManager.getModuleByName("GUI Color")).alpha.getValue() / 255.0F;
if (ModuleManager.getModuleByName("GUI Color").isEnabled()) {
GL11.glColor4f(red, green, blue, alpha);
} else {
GL11.glColor4f(0.17F, 0.17F, 0.18F, 0.9F);
}
RenderHelper.drawFilledRectangle(0.0F, 0.0F, (float)component.getWidth(), (float)component.getHeight());
GL11.glColor3f(0.59F, 0.05F, 0.11F);
GL11.glLineWidth(1.5F);
RenderHelper.drawRectangle(0.0F, 0.0F, (float)component.getWidth(), (float)component.getHeight());
}
}