Beispiel #1
0
        public static void ShowDatePicker(int year, int month, int day, Action <DateTime> onAffirmativeClicked, Color accentColor)
        {
            DialogDatePicker dialog = PrefabManager.InstantiateGameObject(PrefabManager.ResourcePrefabs.dialogDatePicker, instance.transform).GetComponent <DialogDatePicker>();

            dialog.Initialize(year, month, day, onAffirmativeClicked, accentColor);
            dialog.Show();
        }
Beispiel #2
0
        /// <summary>
        /// Shows a date picker dialog with a required date picker, and a required button.
        /// </summary>
        /// <param name="year">The year selected when the dialog is shown.</param>
        /// <param name="month">The month selected when the dialog is shown.</param>
        /// <param name="day">The day selected when the dialog is shown.</param>
        /// <param name="onAffirmativeClicked">Called when the affirmative button is clicked.</param>
        /// <param name="onDismissiveClicked">Called when the negative button is clicked.</param>
        /// <param name="accentColor">Color of the accent of the picker.</param>
        public DialogDatePicker ShowDatePicker(int year, int month, int day, Action <DateTime> onAffirmativeClicked, Action onDismissiveClicked, Color accentColor)
        {
            DialogDatePicker dialog = PrefabManager.InstantiateGameObject(PrefabManager.ResourcePrefabs.dialogDatePicker, GetContentTransform()).GetComponent <DialogDatePicker>();

            DialogManager.CreateActivity(dialog, dialog.transform.parent);
            dialog.Initialize(year, month, day, onAffirmativeClicked, onDismissiveClicked, accentColor);
            dialog.Show();
            return(dialog);
        }