private void RenderRelationsWindow(int id) { Rect windowRect = WindowRect; MiniMapEnabled = windowRect.size.x < currentWindowRenderer.BoundingBox.size.x || windowRect.size.y < currentWindowRenderer.BoundingBox.size.y; if (MiniMapEnabled) { GUI.color = new Color(0.0f, 0.0f, 0.0f, 0.0f); isPanningMiniMap = GUI.RepeatButton(MiniMapWindowRect, ""); GUI.color = Color.white; } currentWindowRenderer.Render(); if (MiniMapEnabled) { RenderingHelper.RenderRect(MiniMapWindowRect, new Color(.5f, .5f, .5f, .3f * (CodeControlMonitorWindow.IsHoveringMiniMap ? 1.0f : CodeControlEditorStyles.MiniMapMouseOutAlpha))); currentWindowRenderer.RenderMiniMap(); RenderingHelper.RenderRect(new Rect(MiniMapWindowRect.x - (WindowOffset.x - WindowPadding.x) * MiniMapScaleFactor, MiniMapWindowRect.y - (WindowOffset.y - WindowPadding.y) * MiniMapScaleFactor, windowRect.width * MiniMapScaleFactor, windowRect.height * MiniMapScaleFactor), new Color(1.0f, 1.0f, 1.0f, .2f * (CodeControlMonitorWindow.IsHoveringMiniMap ? 1.0f : CodeControlEditorStyles.MiniMapMouseOutAlpha)), MiniMapWindowRect); } else { isPanningMiniMap = false; } }
public virtual void RenderMiniMap() { Vector2 position = CodeControlMonitorWindow.MiniMapWindowRect.position + (rect.position + CodeControlMonitorWindow.WindowPadding) * CodeControlMonitorWindow.MiniMapScaleFactor; Vector2 size = rect.size * CodeControlMonitorWindow.MiniMapScaleFactor; RenderingHelper.RenderRect(new Rect(position.x, position.y, size.x, size.y), new Color(1.0f, 1.0f, 1.0f, .5f * (CodeControlMonitorWindow.IsHoveringMiniMap ? 1.0f : CodeControlEditorStyles.MiniMapMouseOutAlpha)), CodeControlMonitorWindow.MiniMapWindowRect); }