protected PropColorPropertyPanel AddColorOptionProperty(UIComponent parent) { var colorOptionProperty = ComponentPool.GetAfter <PropColorPropertyPanel>(parent, nameof(Prefab), nameof(ColorOption)); colorOptionProperty.Text = Localize.StyleOption_ColorOption; colorOptionProperty.UseWheel = true; colorOptionProperty.Init(); colorOptionProperty.SelectedObject = ColorOption; colorOptionProperty.OnSelectObjectChanged += (value) => ColorOption.Value = value; return(colorOptionProperty); }
protected ColorAdvancedPropertyPanel AddSecondColorProperty(UIComponent parent) { var colorProperty = ComponentPool.GetAfter <ColorAdvancedPropertyPanel>(parent, nameof(Color), nameof(SecondColor)); colorProperty.Text = Localize.StyleOption_Color; colorProperty.WheelTip = Editor.WheelTip; colorProperty.Init(); colorProperty.Value = SecondColor; colorProperty.OnValueChanged += (Color32 color) => SecondColor.Value = color; return(colorProperty); }
protected ColorAdvancedPropertyPanel AddColorProperty(UIComponent parent) { var colorProperty = ComponentPool.GetAfter <ColorAdvancedPropertyPanel>(parent, nameof(ColorOption), nameof(Color)); colorProperty.Text = Localize.StyleOption_Color; colorProperty.WheelTip = Settings.ShowToolTip; colorProperty.Init(GetDefault()?.Color); colorProperty.Value = Color; colorProperty.OnValueChanged += (Color32 color) => Color.Value = color; return(colorProperty); }