public FieldWindow(FieldSim field, Vector2 position) : base("Field", true) { List<string> options = new List<string>(); if (field.GetType() == typeof(IndoorFieldSim)) { foreach (CropsType type in GlobalResources.AvailableIndoorCrops) { options.Add(type.ToString()); } } else { foreach (CropsType type in GlobalResources.AvailableCrops) { options.Add(type.ToString()); } } Position = position; _field = field; Dimention = new Vector2(400, 200); _cropChooser = new DropDown(new Vector2(195, 30), options, "None"); _lastSelected = _cropChooser.Selected; AddGuiComponent(_cropChooser); AddGuiComponent(new Label("Crop type:", new Vector2(20, 37))); //Components.Add(new SquareDropdown(new Vector2(10, 30), options, "None")); }
public PastureWindow(PastureSim pasture, Vector2 position) : base("Animal Pasture", true) { List<string> options = new List<string>(); _pasture = pasture; options.Add("Pig"); options.Add("Cattle"); options.Add("Sheep"); Position = position; Dimention = new Vector2(400, 200); _animalSelection = new DropDown(new Vector2(195, 30), options, "None"); AddGuiComponent(_animalSelection); AddGuiComponent(new Label("Animal:", new Vector2(20, 37))); //Components.Add(new SquareDropdown(new Vector2(10, 30), options, "None")); }