public override void OnUIButtonClicked(UIButton uiButton) { if (answered) { return; } UITriviaButton button = (UITriviaButton)uiButton; if (data.type == DatabaseManager.TestData.types.SINGLE) { UnSelectAll(); } button.Toggle(); }
public void OnInit(DatabaseManager.TestData data) { all.Clear(); this.data = data; Init(); Reset(); field.text = data.text; foreach (DatabaseManager.AnswerData d in Data.Instance.databaseManager.GetTriviaByTest(data.id)) { UITriviaButton newButton = (UITriviaButton)AddItem(); newButton.OnInit(d); all.Add(newButton); } }