diff --git a/RasterPropMonitor/Core/MonitorPage.cs b/RasterPropMonitor/Core/MonitorPage.cs index a811c44c..460940d8 100644 --- a/RasterPropMonitor/Core/MonitorPage.cs +++ b/RasterPropMonitor/Core/MonitorPage.cs @@ -241,8 +241,12 @@ public void RenderBackground(RenderTexture screen) GL.Clear(true, true, ourMonitor.emptyColor); break; case BackgroundType.Camera: - if (!cameraObject.Render()) - GL.Clear(true, true, ourMonitor.emptyColor); + if (!cameraObject.Render()) { + if (ourMonitor.noSignalTexture != null) + Graphics.Blit(ourMonitor.noSignalTexture, screen); + else + GL.Clear(true, true, ourMonitor.emptyColor); + } break; case BackgroundType.Texture: Graphics.Blit(backgroundTexture, screen); diff --git a/RasterPropMonitor/Core/RasterPropMonitor.cs b/RasterPropMonitor/Core/RasterPropMonitor.cs index 4bd78b6e..62fa7cb0 100644 --- a/RasterPropMonitor/Core/RasterPropMonitor.cs +++ b/RasterPropMonitor/Core/RasterPropMonitor.cs @@ -44,6 +44,8 @@ public class RasterPropMonitor: InternalModule public bool needsElectricCharge = true; [KSPField] public Color32 defaultFontTint = Color.white; + [KSPField] + public string noSignalTextureURL; // This needs to be public so that pages can point it. public FlyingCamera CameraStructure; // Some things in life are constant; @@ -71,6 +73,7 @@ public class RasterPropMonitor: InternalModule private Rect[] fontCharacters; private FXGroup audioOutput; private double electricChargeReserve; + public Texture2D noSignalTexture; public void Start() { @@ -108,6 +111,10 @@ public void Start() foreach (string layerID in textureLayerID.Split()) screenMat.SetTexture(layerID.Trim(), screenTexture); + if (GameDatabase.Instance.ExistsTexture(noSignalTextureURL.EnforceSlashes())) { + noSignalTexture = GameDatabase.Instance.GetTexture(noSignalTextureURL.EnforceSlashes(), false); + } + // Create camera instance... CameraStructure = new FlyingCamera(part, screenTexture, cameraAspect);