浏览代码

Remove eyedropper from Color fields

/main
Matt Dean 7 年前
当前提交
7f9b3b2c
共有 4 个文件被更改,包括 11 次插入5 次删除
  1. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Controls/ColorControl.cs
  2. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/Slots/ColorRGBSlotControlView.cs
  3. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/Slots/ColorSlotControlView.cs
  4. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/Styles/MaterialGraph.uss

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Controls/ColorControl.cs


if (!string.IsNullOrEmpty(label))
Add(new Label(label));
var colorField = new ColorField { value = (Color)m_PropertyInfo.GetValue(m_Node, null) };
var colorField = new ColorField { value = (Color)m_PropertyInfo.GetValue(m_Node, null),
showEyeDropper = false };
colorField.OnValueChanged(OnChange);
Add(colorField);
}

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/Slots/ColorRGBSlotControlView.cs


public ColorRGBSlotControlView(ColorRGBMaterialSlot slot)
{
m_Slot = slot;
var colorField = new ColorField { value = new Color(slot.value.x, slot.value.y, slot.value.z, 0), showAlpha = false };
var colorField = new ColorField { value = new Color(slot.value.x, slot.value.y, slot.value.z, 0),
showEyeDropper = false, showAlpha = false };
colorField.OnValueChanged(OnValueChanged);
Add(colorField);
}

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/Slots/ColorSlotControlView.cs


public ColorRGBASlotControlView(ColorRGBAMaterialSlot slot)
{
m_Slot = slot;
var colorField = new ColorField { value = slot.value };
var colorField = new ColorField { value = slot.value, showEyeDropper = false };
colorField.OnValueChanged(OnValueChanged);
Add(colorField);
}

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/Styles/MaterialGraph.uss


}
ColorRGBASlotControlView > ColorField {
width: 50;
width: 30;
margin-left: 0;
margin-right: 0;
}
ColorRGBSlotControlView {

ColorRGBSlotControlView > ColorField {
width: 50;
width: 41;
margin-left: 0;
margin-right: 0;
}
.edge.fromMatrix4, .edge.fromMatrix3, .edge.fromMatrix2 {

正在加载...
取消
保存