Skip to content

Commit

Permalink
Pretty colors.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihara committed Nov 30, 2013
1 parent 96fdd19 commit ca92ee3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ private void CreateLightCone()

private void ColorizeLightCone()
{
var newStart = Color.Lerp(new Color(0f, 0f, 1f, 0.7f), new Color(1f, 0f, 0f, 0.7f), 1f / (maximum) * (current - 1));
lightConeRenderer.SetColors(newStart, new Color(newStart.r, newStart.g, newStart.b, 0f));
var newStart = Color32.Lerp(new Color32(0, 0, 255, 178), new Color32(255, 0, 0, 178), 1f / (maximum) * (current - 1));
lightConeRenderer.SetColors(newStart, new Color32(newStart.r, newStart.g, newStart.b, 0));
}

private void DestroyLightCone()
Expand Down
4 changes: 2 additions & 2 deletions RasterPropMonitor/Core/RasterPropMonitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class RasterPropMonitor: InternalModule
[KSPField]
public string textureLayerID = "_MainTex";
[KSPField]
public Color emptyColor = Color.clear;
public Color32 emptyColor = Color.clear;
[KSPField]
public int screenWidth = 32;
[KSPField]
Expand Down Expand Up @@ -195,7 +195,7 @@ public void PageButtonClick(MonitorPage triggeredPage)
PlayClickSound(audioOutput);
}

private void DrawChar(char letter, int x, int y, Color letterColor)
private void DrawChar(char letter, int x, int y, Color32 letterColor)
{
int charCode = (ushort)letter;
// Clever bit.
Expand Down
4 changes: 2 additions & 2 deletions RasterPropMonitor/Handlers/JSIPrimaryFlightDisplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ public class JSIPrimaryFlightDisplay: InternalModule
[KSPField]
public bool ballIsEmissive;
[KSPField]
public Color backgroundColor = Color.black;
public Color32 backgroundColor = Color.black;
[KSPField]
public float ballOpacity = 0.8f;
[KSPField]
public Color ballColor = Color.white;
public Color32 ballColor = Color.white;
[KSPField]
public float markerScale = 0.1f;
[KSPField] // x,y, width, height
Expand Down
12 changes: 6 additions & 6 deletions SCANsatRPM/JSISCANsatRPM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ public class JSISCANsatRPM: InternalModule
[KSPField]
public float redrawEdge = 0.8f;
[KSPField]
public Color iconColorSelf = Color.white;
public Color32 iconColorSelf = Color.white;
[KSPField]
public Color iconColorTarget = Color.yellow;
public Color32 iconColorTarget = Color.yellow;
[KSPField]
public Color iconColorUnvisitedAnomaly = Color.red;
public Color32 iconColorUnvisitedAnomaly = Color.red;
[KSPField]
public Color iconColorVisitedAnomaly = Color.green;
public Color32 iconColorVisitedAnomaly = Color.green;
[KSPField]
public Color iconColorShadow = Color.black;
public Color32 iconColorShadow = Color.black;
[KSPField]
public float zoomModifier = 1.5f;
[KSPField]
Expand All @@ -62,7 +62,7 @@ public class JSISCANsatRPM: InternalModule
[KSPField]
public int trailLimit = 100;
[KSPField]
public Color trailColor = Color.blue;
public Color32 trailColor = Color.blue;
[KSPField]
public double trailPointEvery = 30;
[KSPField]
Expand Down

0 comments on commit ca92ee3

Please sign in to comment.