change scrollbar color

This commit is contained in:
Bella 2020-03-15 18:10:27 -04:00
parent 833c7945d0
commit fc6232d06b
No known key found for this signature in database
GPG Key ID: 03B01AC937D1C89C
2 changed files with 6 additions and 1 deletions

View File

@ -10,6 +10,9 @@ import me.zeroeightsix.kami.gui.rgui.render.AbstractComponentUI;
import me.zeroeightsix.kami.gui.rgui.render.font.FontRenderer;
import org.lwjgl.opengl.GL11;
import static me.zeroeightsix.kami.util.ColourConverter.toF;
import static me.zeroeightsix.kami.util.ColourSet.scrollBar;
/**
* Created by 086 on 27/06/2017.
*/
@ -84,7 +87,7 @@ public class RootScrollpaneUI extends AbstractComponentUI<Scrollpane> {
if (System.currentTimeMillis() - lastScroll < barLife && scrollComponent.liesIn(component) && component.canScrollY()) {
float alpha = Math.min(1, (barLife - (System.currentTimeMillis() - lastScroll)) / 100f) / 3f;
if (dragBar) alpha = 0.4f;
GL11.glColor4f(1, .22f, .22f, alpha);
GL11.glColor4f(toF(scrollBar.getRed()), toF(scrollBar.getGreen()), toF(scrollBar.getBlue()), alpha);
GL11.glDisable(GL11.GL_TEXTURE_2D);
int barHeight = 30;
double progress = (double) component.getScrolledY() / (double) component.getMaxScrollY();

View File

@ -35,4 +35,6 @@ public class ColourSet {
public static Color enumColour = new Color(116, 101, 247);
public static Color chatOutline = new Color(52, 43, 128);
public static Color scrollBar = new Color(116, 101, 247);
}