public virtual MenuItem AddItem(String label, String name = "") { MenuItem item = m_Menu.AddItem(label, String.Empty); item.Name = name; item.Selected += OnItemSelected; if (m_SelectedItem == null) OnItemSelected(item); return item; }
public void TestComboBox() { var control = new ComboBox(canvas); control.AddItem("opt1"); control.AddItem("opt2"); control.AddItem("opt3"); GUI.Test(control, "ComboBox1"); }