Ejemplo n.º 1
0
		public DynamicDropDownMenu Generate(string label = "", TupleList<string, Func<bool>> optionList = null, Direction direction = Direction.Down)
		{
			DynamicDropDownMenu menu = new DynamicDropDownMenu(label, CreateButtonViewStates(label), direction);
			menu.VAnchor = VAnchor.ParentCenter;
			menu.HAnchor = HAnchor.FitToChildren;
			menu.MenuAsWideAsItems = false;
			menu.AlignToRightEdge = true;
			menu.NormalColor = normalFillColor;
			menu.HoverColor = hoverFillColor;
			menu.BorderColor = normalBorderColor;
			menu.BackgroundColor = menu.NormalColor;

			if (optionList != null)
			{
				foreach (Tuple<string, Func<bool>> option in optionList)
				{
					menu.addItem(option.Item1, option.Item2);
				}
			}

			return menu;
		}