Ejemplo n.º 1
0
        public static void ShowTimePicker(int hour, int minute, bool isAM, Action <int, int, bool> onAffirmativeClicked, Color accentColor)
        {
            DialogTimePicker dialog = PrefabManager.InstantiateGameObject(PrefabManager.ResourcePrefabs.dialogTimePicker, instance.transform).GetComponent <DialogTimePicker>();

            dialog.Initialize(hour, minute, isAM, onAffirmativeClicked, accentColor);
            dialog.Show();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Shows a time picker dialog with a required time picker, and a required button.
        /// </summary>
        /// <param name="time">The time selected when the dialog is shown.</param>
        /// <param name="onAffirmativeClicked">Called when the affirmative button is clicked.</param>
        /// <param name="accentColor">Color of the accent of the picker.</param>
        public static void ShowTimePicker(DateTime time, Action <DateTime> onAffirmativeClicked, Color accentColor)
        {
            DialogTimePicker dialog = PrefabManager.InstantiateGameObject(PrefabManager.ResourcePrefabs.dialogTimePicker, instance.transform).GetComponent <DialogTimePicker>();

            dialog.Initialize(time, onAffirmativeClicked, accentColor);
            dialog.Show();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Shows a time picker dialog with a required time picker, and a required button.
        /// </summary>
        /// <param name="time">The time selected when the dialog is shown.</param>
        /// <param name="onAffirmativeClicked">Called when the affirmative button is clicked.</param>
        /// <param name="accentColor">Color of the accent of the picker.</param>
        public DialogTimePicker ShowTimePicker(DateTime time, Action <DateTime> onAffirmativeClicked, Color accentColor)
        {
            DialogTimePicker dialog = PrefabManager.InstantiateGameObject(PrefabManager.ResourcePrefabs.dialogTimePicker, GetContentTransform()).GetComponent <DialogTimePicker>();

            DialogManager.CreateActivity(dialog, dialog.transform.parent);
            dialog.Initialize(time, onAffirmativeClicked, accentColor);
            dialog.Show();
            return(dialog);
        }