forked from RepoMirrors/kami-blue
change scrollbar color
This commit is contained in:
parent
833c7945d0
commit
fc6232d06b
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
}
|
Loading…
Reference in New Issue