public static void Reset()
 {
     RecordReportUtility.scrollPosition  = default(Vector2);
     RecordReportUtility.selectedEntry   = null;
     RecordReportUtility.mousedOverEntry = null;
     RecordReportUtility.cachedDrawEntries.Clear();
 }
        public static void Draw(Rect rect)
        {
            Rect rect2 = new Rect(rect);

            Text.Font = GameFont.Small;
            Rect viewRect = new Rect(0f, 0f, rect2.width - 16f, RecordReportUtility.listHeight);

            Widgets.BeginScrollView(rect2, ref RecordReportUtility.scrollPosition, viewRect, true);
            float  num = 0f;
            string b   = null;

            RecordReportUtility.mousedOverEntry = null;
            for (int i = 0; i < RecordReportUtility.cachedDrawEntries.Count; i++)
            {
                RecordDrawEntry ent = RecordReportUtility.cachedDrawEntries[i];
                if (ent.CanRender)
                {
                    if (ent.data.Parent.LabelCap != b)
                    {
                        Widgets.ListSeparator(ref num, viewRect.width, ent.data.Parent.LabelCap);
                        b = ent.data.Parent.LabelCap;
                    }
                    num += ent.Draw(8f, num, viewRect.width - 8f, RecordReportUtility.selectedEntry == ent, delegate {
                        RecordReportUtility.SelectEntry(ent, true);
                    }, delegate {
                        RecordReportUtility.mousedOverEntry = ent;
                    }, RecordReportUtility.scrollPosition, rect2);
                }
            }
            RecordReportUtility.listHeight = num + 100f;
            Widgets.EndScrollView();
        }
 private static void SelectEntry(RecordDrawEntry rec, bool playSound = true)
 {
     RecordReportUtility.selectedEntry = rec;
     if (playSound)
     {
         SoundDefOf.Tick_High.PlayOneShotOnCamera(null);
     }
 }