mirror of
https://github.com/GTNewHorizons/bdlib.git
synced 2026-11-12 00:07:31 +00:00
added alpha component to Color
This commit is contained in:
1 parent
82e88157f2
commit
4e2df02b8a
1 file changed
+3
-2
@@ -11,10 +11,11 @@ package net.bdew.lib.gui
|
||||
|
||||
import org.lwjgl.opengl.GL11
|
||||
|
||||
case class Color(r: Float, g: Float, b: Float) {
|
||||
case class Color(r: Float, g: Float, b: Float, a: Float = 1) {
|
||||
def this(c: (Float, Float, Float)) = this(c._1, c._2, c._3)
|
||||
def this(c: (Float, Float, Float, Float)) = this(c._1, c._2, c._3, c._4)
|
||||
def activate() {
|
||||
GL11.glColor3f(r, g, b)
|
||||
GL11.glColor4f(r, g, b, a)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user