/// <summary> /// drawing method, first layer, for cameras /// </summary> protected virtual void ExtendedDrawWindowL1() { float num = windowPosition.width - 90f; int num2 = (int)(MaxZoom - CurrentZoom + MinZoom); CalculatedZoom = ((!ZoomMultiplier) ? num2 : (num2 * MinZoomMultiplier * 6)); GUI.Label(new Rect(num, 128f, 80f, 20f), "zoom: " + CalculatedZoom, Styles.guiStyleLabelWhiteBold); if (FlightGlobals.ActiveVessel == part.vessel) { isTargetPoint = GUI.Toggle(new Rect(num - 2f, 233f, 88f, 20f), isTargetPoint, "Target Mark"); } GUI.DrawTexture(texturePosition, textureBackGroundCamera); switch (BaseKspCamera.ShadersToUse) { case 0: BaseKspCamera.CurrentShader = CameraShaders.GetShader(shaderType); break; case 1: BaseKspCamera.CurrentShader = CameraShaders.GetShader1(shaderType1); break; case 2: BaseKspCamera.CurrentShader = CameraShaders.GetShader2(shaderType2); break; } BaseKspCamera.currentShaderName = ((BaseKspCamera.CurrentShader == null) ? "none" : BaseKspCamera.CurrentShader.name); if (Event.current.type == EventType.Repaint) { Graphics.DrawTexture(texturePosition, Render(), BaseKspCamera.CurrentShader); } }
/// <summary> /// drawing method, first layer, for cameras /// </summary> protected virtual void ExtendedDrawWindowL1() { var widthOffset = WindowPosition.width - 90; var calculateZoom = (int)(MaxZoom - CurrentZoom + MinZoom); CalculatedZoom = !ZoomMultiplier ? calculateZoom : calculateZoom * MinZoomMultiplier * 6; GUI.Label(new Rect(widthOffset, 128, 80, 20), "zoom: " + CalculatedZoom, Styles.Label13B); if (FlightGlobals.ActiveVessel == ThisPart.vessel) { _isTargetPoint = GUI.Toggle(new Rect(widthOffset - 2, 233, 88, 20), _isTargetPoint, "Target Mark"); } //GUI.DrawTexture(TexturePosition, _textureBackGroundCamera); switch (ShadersToUse) { case 0: CurrentShader = CameraShaders.GetShader(_shaderType); break; case 1: CurrentShader = CameraShaders.GetShader1(_shaderType1); break; case 2: CurrentShader = CameraShaders.GetShader2(_shaderType2); break; } _currentShaderName = CurrentShader == null ? "none" : CurrentShader.name; Debug.Log("CurrentShader: " + CurrentShader); if (Event.current.type.Equals(EventType.Repaint)) { Graphics.DrawTexture(TexturePosition, Render(), CurrentShader); } }
/// <summary> /// drawing method, first layer, for cameras /// </summary> protected virtual void ExtendedDrawWindowL1() { //GUI.depth = 10; var widthOffset = windowPosition.width - 90; var calculateZoom = (int)(maxZoom - currentZoom + minZoom); calculatedZoom = !zoomMultiplier ? calculateZoom : calculateZoom * minZoomMultiplier * 6; GUI.Label(new Rect(widthOffset, 128, 80, 20), "zoom: " + calculatedZoom, guiStyleLabelBold); isTargetPoint = GUI.Toggle(new Rect(widthOffset - 2, 233, 88, 20), isTargetPoint, "Target Mark"); //Graphics.DrawTexture(texturePosition, textureBackGroundCamera); GUI.DrawTexture(texturePosition, textureBackGroundCamera); switch (shadersToUse) { case 0: CurrentShader = CameraShaders.GetShader(shaderType); break; case 1: CurrentShader = CameraShaders.GetShader1(shaderType1); break; case 2: CurrentShader = CameraShaders.GetShader2(shaderType2); break; } CurrentShaderName = CurrentShader == null ? "none" : CurrentShader.name; if (Event.current.type.Equals(EventType.Repaint)) { Graphics.DrawTexture(texturePosition, Render(), CurrentShader); } }