浏览代码

Changed color picker gradient orientation

Clement Espeute 2 年之前
父节点
当前提交
f44bb1fec3
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      hide/comp/ColorPicker.hx

+ 3 - 3
hide/comp/ColorPicker.hx

@@ -397,17 +397,17 @@ class ColorPicker extends Popup {
 				function(x : Int, y : Int, outVector : Vector) {
 					outVector.x = primarySliders.workValue.x;
 					outVector.y = x / 255.0;
-					outVector.z = y / 255.0;
+					outVector.z = 1.0-(y / 255.0);
 					outVector.w = 1.0;
 				},
 				function(x : Int, y : Int, outVector : Vector) {
 					outVector.x = primarySliders.workValue.x;
 					outVector.y = x / 255.0;
-					outVector.z = y / 255.0;
+					outVector.z = 1.0-(y / 255.0);
 					outVector.w = primarySliders.workValue.w;
 				}, 
 				function() : {x:Int, y:Int} {
-					return {x: Std.int(primarySliders.workValue.y * 255.0), y: Std.int(primarySliders.workValue.z * 255.0)};
+					return {x: Std.int(primarySliders.workValue.y * 255.0), y: Std.int((1.0-primarySliders.workValue.z) * 255.0)};
 				}));