Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

Add Color32 CustomPropertyEditor. #212

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,17 @@ public override float GetElementHeight(GUIContent label, Color element, fiGraphM
}
}

[CustomPropertyEditor(typeof(Color32))]
public class Color32PropertyEditor : PropertyEditor<Color32> {
public override Color32 Edit(Rect region, GUIContent label, Color32 element, fiGraphMetadata metadata) {
return EditorGUI.ColorField(region, label, element);
}

public override float GetElementHeight(GUIContent label, Color32 element, fiGraphMetadata metadata) {
return EditorStyles.colorField.CalcHeight(label, 1000);
}
}

[CustomPropertyEditor(typeof(AnimationCurve))]
public class AnimationCurvePropertyEditor : PropertyEditor<AnimationCurve> {
public override AnimationCurve Edit(Rect region, GUIContent label, AnimationCurve element, fiGraphMetadata metadata) {
Expand Down