コード例 #1
0
        public override void SetData(PropertyDescriptor data)
        {
            if (!(data.PropObject is float val))
            {
                return;
            }

            OnChangeCallback = data.ChangedCallback;

            if (data.AddtionalData is Vector2 minMax && val > minMax.x && val < minMax.y)
            {
                _sliderSetting.slider.minValue = minMax.x;
                _sliderSetting.slider.maxValue = minMax.y;
            }

            _sliderSetting.slider.value = val;
            _sliderSetting.ReceiveValue();
            _sliderSettingText.text = data.Text;

            if (ThemeManager.GetDefinedColor("prop-cell", out var bgColor))
            {
                _backgroundImage.type  = Image.Type.Sliced;
                _backgroundImage.color = bgColor;
            }
        }
コード例 #2
0
 internal void ParentControllerActivated()
 {
     if (dropdownListTransform == null)
     {
         dropdownListTransform = notesDropdownTransform.Find("DropdownTableView").GetComponent <RectTransform>();
     }
     notesDropdown.ReceiveValue();
     sizeSlider.ReceiveValue();
     hmdCheckbox.ReceiveValue();
 }
コード例 #3
0
        public override void SetData(PropertyDescriptor data)
        {
            if (!(data.PropObject is float val))
            {
                return;
            }

            OnChangeCallback            = data.ChangedCallback;
            _sliderSetting.slider.value = val;
            _sliderSetting.ReceiveValue();
            _sliderSettingText.text = data.Text;

            _backgroundImage.type  = Image.Type.Sliced;
            _backgroundImage.color = new Color(1, 0, 0, 0.5f);
        }
コード例 #4
0
        public void OnNoteWasChanged(CustomNote customNote)
        {
            if (string.IsNullOrWhiteSpace(customNote.ErrorMessage))
            {
                noteDescription.SetText($"{customNote.Descriptor.NoteName}:\n\n{Utils.SafeUnescape(customNote.Descriptor.Description)}");
            }
            else
            {
                noteDescription.SetText(string.Empty);
            }

            if (sizeSlider != null)
            {
                sizeSlider.ReceiveValue();
            }
            if (hmdCheckbox != null)
            {
                hmdCheckbox.ReceiveValue();
            }
        }