/// <summary>
    /// Initializes the MessageBox: gets all necessary components
    /// and creates the icon which corresponds to the type of the MessageBox
    /// </summary>
    void Start()
    {
        btn            = button.GetComponent <GaMRButton>();
        tagalongScript = GetComponent <SimpleTagalong>();

        btn.OnPressed = Accept;
        if (type == MessageBoxType.ERROR)
        {
            Instantiate(Resources.Load("Animated Error"), iconPosition.position, Quaternion.identity, iconPosition);
        }
        else if (type == MessageBoxType.SUCCESS)
        {
            Instantiate(Resources.Load("Animated Success"), iconPosition.position, Quaternion.identity, iconPosition);
        }
        else if (type == MessageBoxType.WARNING)
        {
            Instantiate(Resources.Load("Animated Warning"), iconPosition.position, Quaternion.identity, iconPosition);
        }
        else if (type == MessageBoxType.INFORMATION)
        {
            Instantiate(Resources.Load("Animated Info"), iconPosition.position, Quaternion.identity, iconPosition);
        }

        tagalongScript.TagalongDistance = 1.7f + 0.1f * count;
    }
 private void ChangeLanguage(GaMRButton sender)
 {
     InformationManager.Instance.Language = (Language)sender.Data;
     if (OnCloseAction != null)
     {
         OnCloseAction();
     }
     Destroy(gameObject);
 }
    /// <summary>
    /// initializes the annotation box
    /// assigns all buttons
    /// fills it with the text of the annotation
    /// </summary>
    void Start()
    {
        buttonEdit   = editButton.GetComponent <GaMRButton>();
        buttonDelete = deleteButton.GetComponent <GaMRButton>();
        buttonClose  = closeButton.GetComponent <GaMRButton>();
        caption      = textField.GetComponent <Caption>();

        // necessary since caption has not yet called Start() but is needed immediately
        caption.Init();
        caption.Text = container.Annotation.Text;

        buttonEdit.OnPressed   = EditText;
        buttonDelete.OnPressed = DeleteAnnotation;
        buttonClose.OnPressed  = Close;
    }
Esempio n. 4
0
    private void OnQuestionSelected(GaMRButton sender)
    {
        int nButton = questionSelected - startIndex;

        if (nButton >= 0 && nButton < buttons.Count)
        {
            buttons[nButton].ButtonChecked = false;
        }
        questionSelected = sender.Data;
        ((FocusableCheckButton)sender).ButtonChecked = true;
        if (quizManager.PositionToName)
        {
            quizManager.EvaluateQuestion(quizManager.Annotations[questionSelected].Text);
        }
        else
        {
            quizManager.CurrentlySelectedName = quizManager.Annotations[questionSelected].Text;
        }
    }
 private void OnQuizSelected(GaMRButton sender)
 {
     quizSelected = sender.Data;
     Close();
 }
Esempio n. 6
0
 private void ClickText4(GaMRButton sender)
 {
     ClickedText(4);
 }
Esempio n. 7
0
 private void ClickText3(GaMRButton sender)
 {
     ClickedText(3);
 }
Esempio n. 8
0
 private void ClickText2(GaMRButton sender)
 {
     ClickedText(2);
 }
Esempio n. 9
0
 private void ClickText1(GaMRButton sender)
 {
     ClickedText(1);
 }
Esempio n. 10
0
 private void ClickText0(GaMRButton sender)
 {
     ClickedText(0);
 }