public static void DrawCurveMarks(Rect rect, Rect viewRect, List <CurveMark> marks) { float x = viewRect.x; float num = viewRect.x + viewRect.width; float num2 = rect.y + 5f; float num3 = rect.yMax - 5f; int num4; for (num4 = 0; num4 < marks.Count; num4++) { CurveMark curveMark = marks[num4]; if (curveMark.X >= x && curveMark.X <= num) { GUI.color = curveMark.Color; Vector2 screenPoint = new Vector2(rect.x + (curveMark.X - x) / (num - x) * rect.width, (num4 % 2 == 0) ? num2 : num3); DrawPoint(screenPoint); Rect rect2 = new Rect(screenPoint.x - 5f, screenPoint.y - 5f, 10f, 10f); if (Mouse.IsOver(rect2)) { TooltipHandler.TipRegion(rect2, new TipSignal(curveMark.Message)); } } num4++; } GUI.color = Color.white; }
public static void DrawCurveMarks(Rect rect, Rect viewRect, List <CurveMark> marks) { float x = viewRect.x; float num = viewRect.x + viewRect.width; float num2 = rect.y + 5f; float num3 = rect.yMax - 5f; for (int i = 0; i < marks.Count; i++) { CurveMark curveMark = marks[i]; if (curveMark.X >= x && curveMark.X <= num) { GUI.color = curveMark.Color; Vector2 screenPoint = new Vector2(rect.x + (curveMark.X - x) / (num - x) * rect.width, (i % 2 != 0) ? num3 : num2); SimpleCurveDrawer.DrawPoint(screenPoint); TooltipHandler.TipRegion(new Rect(screenPoint.x - 5f, screenPoint.y - 5f, 10f, 10f), new TipSignal(curveMark.Message)); } i++; } GUI.color = Color.white; }