private void drawCraftingMenu() { float menuTextH = 50f; GUI.Box(new Rect(0, 0, crftW, menuTextH), "Crafting"); float buttonH = (crftH - menuTextH) / 2; for (int i = 0; i < blueprints.Count; i++) { IBlueprint bp = blueprints [i]; Dictionary <string, int> mats = bp.getMaterials(); string name = bp.getName(); string textForButton = formCraftableMaterialString(name, mats); if (GUI.Button(new Rect(0, (i * buttonH) + menuTextH, crftW, buttonH), textForButton)) { SendMessage("Craft", bp); } } }