private void InitializeButtons() { itemButton1 = transform.Find("Item1 Button").gameObject.GetComponent <FocusableCheckButton>(); itemButton2 = transform.Find("Item2 Button").gameObject.GetComponent <FocusableCheckButton>(); itemButton3 = transform.Find("Item3 Button").gameObject.GetComponent <FocusableCheckButton>(); itemButton4 = transform.Find("Item4 Button").gameObject.GetComponent <FocusableCheckButton>(); itemButton5 = transform.Find("Item5 Button").gameObject.GetComponent <FocusableCheckButton>(); buttons.Add(itemButton1); buttons.Add(itemButton2); buttons.Add(itemButton3); buttons.Add(itemButton4); buttons.Add(itemButton5); for (int i = 0; i < buttons.Count; i++) { buttons[i].OnButtonPressed = OnQuestionSelected; } pageDownButton = transform.Find("Down Button").gameObject.GetComponent <FocusableButton>(); pageUpButton = transform.Find("Up Button").gameObject.GetComponent <FocusableButton>(); pageDownButton.OnPressed = PageDown; pageUpButton.OnPressed = PageUp; OnUpdateLanguage(); FillQuestions(); }
private void InitializeButtons() { settingsButton = transform.Find("Settings Button").GetComponent <FocusableButton>(); loginButton = transform.Find("Login Button").GetComponent <FocusableButton>(); authorButton = transform.Find("Author Button").GetComponent <FocusableCheckButton>(); settingsButton.OnPressed = ShowSettings; loginButton.OnPressed = Login; authorButton.OnPressed = TogglePlayerType; authorButton.ButtonChecked = (InformationManager.Instance.playerType == PlayerType.AUTHOR); OnUpdateLanguage(); }
private void InitializeButtons() { deleteButton = transform.Find("Delete Button").gameObject.GetComponent <FocusableButton>(); editModeButton = transform.Find("EditMode Button").gameObject.GetComponent <FocusableCheckButton>(); boundingBoxButton = transform.Find("Box Button").gameObject.GetComponent <FocusableCheckButton>(); quizButton = transform.Find("Quiz Button").gameObject.GetComponent <FocusableCheckButton>(); createQuizButton = transform.Find("CreateQuiz Button").gameObject.GetComponent <FocusableButton>(); closeButton = transform.Find("Close Button").gameObject.GetComponent <FocusableButton>(); deleteButton.OnPressed = () => { actions.DeleteObject(); Destroy(); }; editModeButton.OnPressed = ToggleEditMode; boundingBoxButton.OnPressed = ToggleBoundingBox; quizButton.OnPressed = SelectQuiz; closeButton.OnPressed = Close; createQuizButton.OnPressed = actions.CreateNewQuiz; boundingBoxButton.ButtonChecked = true; editModeButton.ButtonChecked = true; quizButton.ButtonChecked = false; OnUpdateLanguage(); }