예제 #1
0
 private void BuildTableIngredients(ImGui gui, ProductionTable table, ProductionTable context, ref ImGuiUtils.InlineGridBuilder grid)
 {
     foreach (var flow in table.flow)
     {
         if (flow.amount >= -1e-5f)
         {
             break;
         }
         grid.Next();
         BuildGoodsIcon(gui, flow.goods, -flow.amount, ProductDropdownType.Ingredient, null, context);
     }
 }
예제 #2
0
        private void BuildTableProducts(ImGui gui, ProductionTable table, ProductionTable context, ref ImGuiUtils.InlineGridBuilder grid)
        {
            var flow         = table.flow;
            var firstProduct = Array.BinarySearch(flow, new ProductionTableFlow(Database.voidEnergy, 1e-5f, 0), model);

            if (firstProduct < 0)
            {
                firstProduct = ~firstProduct;
            }
            for (var i = firstProduct; i < flow.Length; i++)
            {
                grid.Next();
                BuildGoodsIcon(gui, flow[i].goods, flow[i].amount, ProductDropdownType.Product, null, context);
            }
        }