Skip to content

Commit 724b865

Browse files
committed
Move ColorValues enum to parent namespace so it gets used over the stock KSP one
1 parent 537a185 commit 724b865

File tree

7 files changed

+5
-11
lines changed

7 files changed

+5
-11
lines changed

SCANsat.Unity/HSVPicker/Enums/ColorValues.cs renamed to SCANsat.Unity/HSVPicker/ColorValues.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using UnityEngine;
22

3-
namespace SCANsat.Unity.HSVPicker.Enum
3+
namespace SCANsat.Unity.HSVPicker
44
{
55
public enum ColorValues
66
{

SCANsat.Unity/HSVPicker/UI/ColorInput.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using UnityEngine;
22
using UnityEngine.UI;
33
using System;
4-
using SCANsat.Unity.HSVPicker.Enum;
54

65
namespace SCANsat.Unity.HSVPicker.UI
76
{

SCANsat.Unity/HSVPicker/UI/ColorLabel.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
using UnityEngine;
22
using System;
3-
using SCANsat.Unity.HSVPicker.Enum;
43

54
namespace SCANsat.Unity.HSVPicker.UI
65
{
76
[RequireComponent(typeof(TextHandler))]
87
public class ColorLabel : MonoBehaviour
98
{
109
public ColorPicker picker;
11-
public Enum.ColorValues type;
10+
public ColorValues type;
1211

1312
private TextHandler label;
1413

@@ -58,23 +57,23 @@ private void UpdateValue()
5857
float valueThree = 0;
5958

6059

61-
if (type == Enum.ColorValues.R)
60+
if (type == ColorValues.R)
6261
{
6362
valueOne = picker.GetValue(ColorValues.R) * 255;
6463
valueTwo = picker.GetValue(ColorValues.G) * 255;
6564
valueThree = picker.GetValue(ColorValues.B) * 255;
6665

6766
label.OnTextUpdate.Invoke(string.Format("{0:N0},{1:N0},{2:N0}", Mathf.FloorToInt(valueOne), Mathf.FloorToInt(valueTwo), Mathf.FloorToInt(valueThree)));
6867
}
69-
else if (type == Enum.ColorValues.Hue)
68+
else if (type == ColorValues.Hue)
7069
{
7170
valueOne = picker.GetValue(ColorValues.Hue) * 360;
7271
valueTwo = picker.GetValue(ColorValues.Saturation) * 255;
7372
valueThree = picker.GetValue(ColorValues.Value) * 255;
7473

7574
label.OnTextUpdate.Invoke(string.Format("{0:N0},{1:N0},{2:N0}", Mathf.FloorToInt(valueOne), Mathf.FloorToInt(valueTwo), Mathf.FloorToInt(valueThree)));
7675
}
77-
else if (type == Enum.ColorValues.Hex)
76+
else if (type == ColorValues.Hex)
7877
{
7978
valueOne = picker.GetValue(ColorValues.R) * 255;
8079
valueTwo = picker.GetValue(ColorValues.G) * 255;

SCANsat.Unity/HSVPicker/UI/ColorPicker.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using UnityEngine.UI;
44
using UnityEngine.Events;
55
using SCANsat.Unity.HSVPicker.Utility;
6-
using SCANsat.Unity.HSVPicker.Enum;
76
using SCANsat.Unity.HSVPicker.Events;
87

98
namespace SCANsat.Unity.HSVPicker.UI

SCANsat.Unity/HSVPicker/UI/ColorSlider.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using UnityEngine;
22
using UnityEngine.UI;
33
using System;
4-
using SCANsat.Unity.HSVPicker.Enum;
54

65
namespace SCANsat.Unity.HSVPicker.UI
76
{

SCANsat.Unity/HSVPicker/UI/ColorSliderImage.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using UnityEngine;
22
using UnityEngine.UI;
33
using System.Collections;
4-
using SCANsat.Unity.HSVPicker.Enum;
54
using SCANsat.Unity.HSVPicker.Utility;
65

76
namespace SCANsat.Unity.HSVPicker.UI

SCANsat.Unity/HSVPicker/UI/SVBoxSlider.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using UnityEngine.UI;
33
using System.Collections;
44
using SCANsat.Unity.HSVPicker.Utility;
5-
using SCANsat.Unity.HSVPicker.Enum;
65

76
namespace SCANsat.Unity.HSVPicker.UI
87
{

0 commit comments

Comments
 (0)