Skip to content

Commit

Permalink
Actual fix for new interface methods
Browse files Browse the repository at this point in the history
Actual fix for new interface methods
  • Loading branch information
judah4 committed Feb 10, 2016
1 parent 60de71c commit 12c8338
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 26 deletions.
Binary file removed Assets/HSVPicker/SimplePicker.prefab
Binary file not shown.
12 changes: 11 additions & 1 deletion Assets/HSVPicker/UtilityScripts/BoxSlider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,17 @@ public virtual void Rebuild(CanvasUpdate executing)
#endif
}

public static bool SetClass<T>(ref T currentValue, T newValue) where T: class
public void LayoutComplete()
{

}

public void GraphicUpdateComplete()
{

}

public static bool SetClass<T>(ref T currentValue, T newValue) where T: class
{
if ((currentValue == null && newValue == null) || (currentValue != null && currentValue.Equals(newValue)))
return false;
Expand Down
27 changes: 2 additions & 25 deletions Assets/HSVPicker/UtilityScripts/HSVUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,8 @@ public static Color ConvertHsvToRgb(double h, double s, double v, float alpha)
g = v;
b = v;
}
<<<<<<< HEAD

// Generates a list of colors with hues ranging from 0 360
// and a saturation and value of 1.
public static List<Color> GenerateHsvSpectrum(int minHue = 0, int maxHue = 360)
=======
else
>>>>>>> ae93a66b32119e349371256cb1a74aeb4c250e53
{
int i;
double f, p, q, t;
Expand All @@ -92,11 +86,8 @@ public static List<Color> GenerateHsvSpectrum(int minHue = 0, int maxHue = 360)
q = v * (1.0 - (s * f));
t = v * (1.0 - (s * (1.0f - f)));

<<<<<<< HEAD
for (int i = minHue; i < (maxHue - 1); i++)
=======

switch (i)
>>>>>>> ae93a66b32119e349371256cb1a74aeb4c250e53
{
case 0:
r = v;
Expand Down Expand Up @@ -134,28 +125,14 @@ public static List<Color> GenerateHsvSpectrum(int minHue = 0, int maxHue = 360)
b = q;
break;
}
<<<<<<< HEAD

colorsList.Add(ConvertHsvToRgb(maxHue, 1, 1));

return colorsList;

}

public static Texture2D GenerateHSVTexture(int width, int height, int minHue = 0, int maxHue = 360)
{
var list = GenerateHsvSpectrum(minHue, maxHue);

float interval = (float)list.Count / height;
=======

}

return new Color((float)r, (float)g, (float)b, alpha);

}
}
>>>>>>> ae93a66b32119e349371256cb1a74aeb4c250e53


#endregion ColorUtilities

Expand Down

0 comments on commit 12c8338

Please sign in to comment.