//specific methods /// <summary> /// add answer choice /// </summary> public void AddAnswerChoice() { AddAnswerChoiceLink.WaitUntilVisible().Click(); AnswerChoiceList.Clear(); //wait for post back to find the tab InteractionTab.WaitUntilVisible(); SetUniqueControlIdentifiers(); }
/// <summary> /// remove line /// </summary> /// <param name="label">the line item's letter</param> public void RemoveLine(string label) { foreach (var answerChoice in AnswerChoiceList) { if (answerChoice.Label.Equals(label)) { answerChoice.RemoveLine(); } } AnswerChoiceList.Clear(); //wait for post back to find the tab InteractionTab.WaitUntilVisible(); SetUniqueControlIdentifiers(); }
public void AddTab(OrbitalInteraction interaction) { InteractionTab tab = interaction.GetTab(); tabs.Add(tab); if (tabs.Count > 1) { tab.gameObject.SetActive(false); } RectTransform t = (RectTransform)tab.transform; t.SetParent(this.transform, false); TabButton button = GameObject.Instantiate(InteractionUI.button).GetComponent <TabButton>(); button.Bind(this, tab); button.text = tab.GetTitle(); button.transform.SetParent(tabButtonHolder.transform, false); ((RectTransform)button.transform).localPosition = new Vector2(10 + (170 * (tabs.Count - 1)), 0); }
/// <summary> /// select tab /// </summary> public void SelectTab() { InteractionTab.Wait(3).Click(); }
public void SetActiveTab(InteractionTab tab) { ClearTabs(); tab.gameObject.SetActive(true); }
public void Bind(InteractionUI window, InteractionTab tab) { this.window = window; this.tab = tab; }