private void CreateMenu(List <MenuButton> selectables) { if (selectables == null) { return; } foreach (var selectable in selectables) { Transform button = Transform.Instantiate(buttonPrefab); ControllerDrivenUIButton buttonComponent = button.GetComponent <ControllerDrivenUIButton> (); buttonComponent.SetMenuButton(selectable); button.SetParent(buttonArea); buttons.Add(buttonComponent); } selected = new BidirectionalListIterator <ControllerDrivenUIButton> (buttons); }
public void Select(ControllerDrivenUIButton selectable) { selectable.Click(); }
public void Focus(ControllerDrivenUIButton selectable) { selectable.Focus(); }