public static Bill DrawListing(BillStack billStack, Rect rect, Func <List <FloatMenuOption> > recipeOptionsMaker, ScrollView scrollView)
        {
            Bill result = null;

            GUI.BeginGroup(rect);
            Text.Font = GameFont.Small;
            if (billStack.Count < 10)
            {
                Rect rect2 = new Rect(0f, 0f, 150f, 29f);
                if (Widgets.TextButton(rect2, "AddBill".Translate(), true, false))
                {
                    Find.WindowStack.Add(new FloatMenu(recipeOptionsMaker(), false));
                }
            }
            Text.Anchor = TextAnchor.UpperLeft;
            GUI.color   = Color.white;
            Rect viewRect = new Rect(0f, 35f, rect.width, rect.height - 35f);

            scrollView.Begin(viewRect);
            float num = 0f;

            for (int i = 0; i < billStack.Count; i++)
            {
                Bill bill  = billStack[i];
                Rect rect3 = BillDrawer.DrawProductionBill(billStack, bill, 0f, num, scrollView.ViewWidth, i);
                if (!bill.DeletedOrDereferenced && rect3.Contains(Event.current.mousePosition))
                {
                    result = bill;
                }
                num += rect3.height + 6f;
            }
            scrollView.End(num + 60f);
            GUI.EndGroup();
            return(result);
        }