Esempio n. 1
0
        protected virtual void HandleOnReloadElement(ScrollDataView.ReloadEventArgs args)
        {
            var clickableOption = args.LayoutElement != null?args.LayoutElement.GetComponent <DialogClickableOption>() : null;

            if (clickableOption != null)
            {
                clickableOption.onItemClicked.RemoveListener(HandleUnsafeOnItemClicked);
                clickableOption.onItemClicked.AddListener(HandleUnsafeOnItemClicked);
            }
        }
Esempio n. 2
0
        protected override void ApplyReload(ScrollDataView.ReloadEventArgs oldArgs, ScrollDataView.ReloadEventArgs newArgs)
        {
            base.ApplyReload(oldArgs, newArgs);
            year = (int)Data;

            var sender = Sender != null?Sender.GetComponentInParent <ReloadableDialogDatePickerYearList>() : null;

            if (sender != null)
            {
                //Update color
                selectedImage.color = sender.AccentColor;

                ///Update Toggle State
                UpdateState(sender.GetCurrentYear());
            }
        }
Esempio n. 3
0
        protected override void ApplyReload(ScrollDataView.ReloadEventArgs oldArgs, ScrollDataView.ReloadEventArgs newArgs)
        {
            BaseDialogList dialog = DataView != null?DataView.GetComponentInParent <BaseDialogList>() : null;

            if (dialog != null)
            {
                OptionData option = Data as OptionData;
                if (m_ItemText != null)
                {
                    m_ItemText.SetGraphicText(option != null ? option.text : "");
                }
                if (m_ItemIcon != null)
                {
                    m_ItemIcon.SetImageData(option != null ? option.imageData : null);
                    //m_ItemIcon.gameObject.SetActive(m_ItemIcon.GetImageData() != null && m_ItemIcon.GetImageData().ContainsData(true));
                }
            }
        }