예제 #1
0
        /// <summary>
        /// Updates the calendar.
        /// Should be called only after changing culture settings.
        /// </summary>
        public override void UpdateCalendar()
        {
            if (YearsScrollBlock != null)
            {
                YearsScrollBlock.UpdateView();
            }

            if (MonthsScrollBlock != null)
            {
                MonthsScrollBlock.UpdateView();
            }

            if (DaysScrollBlock != null)
            {
                DaysScrollBlock.UpdateView();
            }
        }
예제 #2
0
        /// <summary>
        /// Updates the inputs.
        /// </summary>
        public override void UpdateInputs()
        {
            if (HoursScrollBlock != null)
            {
                HoursScrollBlock.UpdateView();
            }

            if (MinutesScrollBlock != null)
            {
                MinutesScrollBlock.UpdateView();
            }

            if (SecondsScrollBlock != null)
            {
                SecondsScrollBlock.UpdateView();
            }

            if (AMPMScrollBlock != null)
            {
                AMPMScrollBlock.UpdateView();
            }
        }
예제 #3
0
        /// <summary>
        /// Enable points view.
        /// </summary>
        /// <param name="pointsView">Points view.</param>
        protected virtual void EnablePointsView(ScrollBlock pointsView)
        {
            if (pointsView == null)
            {
                return;
            }

            DataHeaderSize = (pointsView.DefaultItem.transform as RectTransform).rect.size;

            pointsView.AlwaysCenter = false;
            pointsView.Increase     = Increase;
            pointsView.Decrease     = Decrease;
            pointsView.Value        = Value2Text;
            pointsView.UpdateView();

            var points_drag = Utilites.GetOrAddComponent <DragListener>(pointsView);

            points_drag.OnInitializePotentialDragEvent.AddListener(OnPointsDragInit);
            points_drag.OnDragStartEvent.AddListener(OnPointsDragBegin);
            points_drag.OnDragEvent.AddListener(OnPointsDrag);
            points_drag.OnDragEndEvent.AddListener(OnPointsDragEnd);
            points_drag.OnScrollEvent.AddListener(OnPointsScroll);
        }
예제 #4
0
        /// <summary>
        /// Updates the calendar.
        /// Should be called only after changing culture settings.
        /// </summary>
        public override void UpdateCalendar()
        {
            base.UpdateCalendar();

            if (HoursScrollBlock != null)
            {
                HoursScrollBlock.UpdateView();
            }

            if (MinutesScrollBlock != null)
            {
                MinutesScrollBlock.UpdateView();
            }

            if (SecondsScrollBlock != null)
            {
                SecondsScrollBlock.UpdateView();
            }

            if (AMPMScrollBlock != null)
            {
                AMPMScrollBlock.UpdateView();
            }
        }