Esempio n. 1
0
 public void AddEntries(DistinctOptionInfo option)
 {
     foreach (string _value in option.ValidValues) {
         string value = _value; // create a copy for the action
         Action onSelected = () => {
             Console.WriteLine ("OnClick: " + value);
             option.Value = value;
             selected.Info.Text = value;
             dropdown.IsVisible = false;
         };
         dropdown.AddButton (new MenuItemInfo (text: value, onClick: onSelected));
     }
     selected.Info.Text = option.Value;
 }
Esempio n. 2
0
 public virtual void AddDropDown(MenuItemInfo info, DistinctOptionInfo option)
 {
     int num = Items.Count;
     DropDownMenu item = new DropDownMenu (screen, ItemDisplayLayer, num, info);
     assignMenuItemInfo (ref info, num, item);
     item.AddEntries (option);
     Items.Add (item);
 }
Esempio n. 3
0
 public override void AddDropDown(MenuItemInfo info, DistinctOptionInfo option)
 {
     int num = Items.Count;
     info.RelativePosition = () => RelativeItemPosition (num);
     info.RelativeSize = () => RelativeItemSize (num);
     base.AddDropDown (info, option);
 }