Browse Source

Added Color ctor for vec4f.

Mark Sibly 8 years ago
parent
commit
9f11817ffe
1 changed files with 7 additions and 0 deletions
  1. 7 0
      modules/std/graphics/color.monkey2

+ 7 - 0
modules/std/graphics/color.monkey2

@@ -186,6 +186,13 @@ Namespace std.graphics
 		Self.a=a
 	End
 	
+	Method New( v:geom.Vec4f )
+		Self.r=v.x
+		Self.g=v.y
+		Self.b=v.z
+		Self.a=v.w
+	End
+	
 	#rem monkeydoc Converts the color to a printable string.
 	#end
 	Operator To:String()