forked from RepoMirrors/kami-blue
update for guicolor
This commit is contained in:
parent
30c89ac888
commit
0843e260d2
|
@ -4,8 +4,10 @@ import me.zeroeightsix.kami.gui.kami.RenderHelper;
|
||||||
import me.zeroeightsix.kami.gui.kami.component.SettingsPanel;
|
import me.zeroeightsix.kami.gui.kami.component.SettingsPanel;
|
||||||
import me.zeroeightsix.kami.gui.rgui.render.AbstractComponentUI;
|
import me.zeroeightsix.kami.gui.rgui.render.AbstractComponentUI;
|
||||||
import me.zeroeightsix.kami.gui.rgui.render.font.FontRenderer;
|
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.
|
* Created by 086 on 16/12/2017.
|
||||||
|
@ -15,20 +17,21 @@ public class KamiSettingsPanelUI extends AbstractComponentUI<SettingsPanel> {
|
||||||
@Override
|
@Override
|
||||||
public void renderComponent(SettingsPanel component, FontRenderer fontRenderer) {
|
public void renderComponent(SettingsPanel component, FontRenderer fontRenderer) {
|
||||||
super.renderComponent(component, 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);
|
GL11.glLineWidth(2.0F);
|
||||||
glColor4f(.17f,.17f,.18f,.9f);
|
float red = (float)(Integer)((GUIColor)ModuleManager.getModuleByName("GUI Color")).red.getValue() / 255.0F;
|
||||||
RenderHelper.drawFilledRectangle(0,0,component.getWidth(),component.getHeight());
|
float green = (float)(Integer)((GUIColor)ModuleManager.getModuleByName("GUI Color")).green.getValue() / 255.0F;
|
||||||
glColor3f(.59f,.05f,.11f);
|
float blue = (float)(Integer)((GUIColor)ModuleManager.getModuleByName("GUI Color")).blue.getValue() / 255.0F;
|
||||||
glLineWidth(1.5f);
|
float alpha = (float)(Integer)((GUIColor)ModuleManager.getModuleByName("GUI Color")).alpha.getValue() / 255.0F;
|
||||||
RenderHelper.drawRectangle(0,0,component.getWidth(),component.getHeight());
|
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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue