public void OnSimpleListBigVectorButtonClicked()
    {
        List <OptionData> options = new List <OptionData>();

        for (int i = 0; i < m_BigStringList.Length; i++)
        {
            string itemValue = m_BigStringList[i];

            OptionData optionData = new OptionData(itemValue, MaterialIconHelper.GetRandomIcon(), () => { Debug.Log("I am selected: " + itemValue); });
            options.Add(optionData);
        }

        DialogManager.ShowSimpleList(options.ToArray(), (int selectedIndex) => {
            ToastManager.Show("Item #" + selectedIndex + " selected: " + m_BigStringList[selectedIndex]);
        }, "Big Simple List - Vector", MaterialIconHelper.GetRandomIcon());
    }
    public void OnAlertFromLeftButtonClicked()
    {
        DialogAlert dialog = DialogManager.CreateAlert();

        dialog.Initialize("Example with a dialog animation that comes from the left", null, "OK", "Alert!", MaterialIconHelper.GetRandomIcon(), null, null);

        var oldAnimator = dialog.GetComponent <AbstractTweenBehaviour>() as Component;

        if (oldAnimator != null)
        {
            Object.DestroyImmediate(oldAnimator);
        }

        var animator = dialog.gameObject.AddComponent <EasyFrameAnimator>();

        animator.slideIn           = true;
        animator.slideInDirection  = ScreenView.SlideDirection.Left;
        animator.slideOut          = true;
        animator.slideOutDirection = ScreenView.SlideDirection.Left;

        dialog.Show();
    }
 public void OnAlertTwoCallbacksButtonClicked()
 {
     DialogManager.ShowAlert("Example with one affirmative and one dismissive button", () => { ToastManager.Show("You clicked the affirmative button"); }, "YES", "Two callbacks", MaterialIconHelper.GetRandomIcon(), () => { ToastManager.Show("You clicked the dismissive button"); }, "NO");
 }
 public void OnAlertOneCallbackButtonClicked()
 {
     DialogManager.ShowAlert("Example with just one button", () => { ToastManager.Show("You clicked the affirmative button"); }, "OK", "One callback", MaterialIconHelper.GetRandomIcon());
 }
 public void OnAlertSimpleButtonClicked()
 {
     DialogManager.ShowAlert("Hello world", "Alert!", MaterialIconHelper.GetRandomIcon());
 }
 public void OnTwoFieldsPromptButtonClicked()
 {
     DialogManager.ShowPrompt("First name", "Last name", (string firstInputFieldValue, string secondInputFieldValue) => { ToastManager.Show("Returned: " + firstInputFieldValue + " and " + secondInputFieldValue); }, "OK", "Prompt Two Fields", MaterialIconHelper.GetRandomIcon(), () => { ToastManager.Show("You clicked the cancel button"); }, "CANCEL");
 }
 public void OnOneFieldPromptButtonClicked()
 {
     DialogManager.ShowPrompt("Username", (string inputFieldValue) => { ToastManager.Show("Returned: " + inputFieldValue); }, "OK", "Prompt One Field", MaterialIconHelper.GetRandomIcon(), () => { ToastManager.Show("You clicked the cancel button"); }, "CANCEL");
 }
 public void OnRadioListBigButtonClicked()
 {
     DialogManager.ShowRadioList(m_BigStringList, (int selectedIndex) => {
         ToastManager.Show("Item #" + selectedIndex + " selected: " + m_BigStringList[selectedIndex]);
     }, "OK", "Big Radio List", MaterialIconHelper.GetRandomIcon(), () => { ToastManager.Show("You clicked the cancel button"); }, "CANCEL");
 }
 public void OnCheckboxListBigButtonClicked()
 {
     DialogManager.ShowCheckboxList(m_BigStringList, OnCheckboxValidateClicked, "OK", "Big Checkbox List", MaterialIconHelper.GetRandomIcon(), () => { ToastManager.Show("You clicked the cancel button"); }, "CANCEL");
 }
Example #10
0
 public void OnIconRandomButtonClicked()
 {
     m_VectorImage.SetImageData(MaterialIconHelper.GetRandomIcon());
 }
    public void OnAlertFromLeftButtonClicked()
    {
        DialogAlert dialog = DialogManager.CreateAlert();

        dialog.Initialize("Example with a dialog animation that comes from the left", null, "OK", "Alert!", MaterialIconHelper.GetRandomIcon(), null, null);
        dialog.dialogAnimator = new DialogAnimatorSlide(0.5f, DialogAnimatorSlide.SlideDirection.Left, DialogAnimatorSlide.SlideDirection.Right);
        dialog.Show();
    }