add a colourconverter

This commit is contained in:
Bella 2020-02-11 19:27:13 -05:00
parent 257b4541c1
commit 52cbc6fb94
3 changed files with 13 additions and 2 deletions

View File

@ -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);

View File

@ -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());

View File

@ -0,0 +1,10 @@
package me.zeroeightsix.kami.util;
/**
* @author S-B99
*/
public class ColourConverter {
public static float toF(int i) {
return i / 255f;
}
}