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; } }
internal void ParentControllerActivated() { if (dropdownListTransform == null) { dropdownListTransform = notesDropdownTransform.Find("DropdownTableView").GetComponent <RectTransform>(); } notesDropdown.ReceiveValue(); sizeSlider.ReceiveValue(); hmdCheckbox.ReceiveValue(); }
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); }
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(); } }