mirror of https://github.com/kami-blue/client
add a colourconverter
This commit is contained in:
parent
257b4541c1
commit
52cbc6fb94
|
@ -48,7 +48,7 @@ public class KamiEnumButtonUI extends AbstractComponentUI<EnumButton> {
|
|||
float downscale = 1.1f;
|
||||
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
glColor3f(.60f, .56f, 1.00f); // ENUM AND BIND COLORS
|
||||
glColor3f(.60f, .56f, 1.00f); // SEARCHCOLOUR: Enum and Bind Colours
|
||||
glBegin(GL_LINES);
|
||||
{
|
||||
glVertex2d(startX, height / downscale);
|
||||
|
|
|
@ -19,6 +19,7 @@ import me.zeroeightsix.kami.util.ColourHolder;
|
|||
import me.zeroeightsix.kami.util.Wrapper;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import static me.zeroeightsix.kami.util.ColourConverter.toF;
|
||||
import static org.lwjgl.opengl.GL11.*;
|
||||
|
||||
/**
|
||||
|
@ -47,7 +48,7 @@ public class KamiFrameUI<T extends Frame> extends AbstractComponentUI<Frame> {
|
|||
|
||||
glColor4f(.17f, .17f, .18f, .9f);
|
||||
RenderHelper.drawFilledRectangle(0, 0, component.getWidth(), component.getHeight());
|
||||
glColor3f(.60f, .56f, 1.00f);
|
||||
glColor3f(toF(116), toF(101), toF(247)); // SEARCHCOLOUR: main ui outline color
|
||||
glLineWidth(1.5f);
|
||||
RenderHelper.drawRectangle(0, 0, component.getWidth(), component.getHeight());
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
package me.zeroeightsix.kami.util;
|
||||
|
||||
/**
|
||||
* @author S-B99
|
||||
*/
|
||||
public class ColourConverter {
|
||||
public static float toF(int i) {
|
||||
return i / 255f;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue