mirror of
https://github.com/mob-sakai/UIEffect.git
synced 2026-11-19 17:22:37 +08:00
fix: indicate in the inspector using tooltips and asterisks that Rotation and Keep Aspect Ratio are shared properties
This commit is contained in:
@@ -101,6 +101,8 @@ namespace Coffee.UIEffects.Editors
|
||||
private SerializedProperty _detailTexSpeed;
|
||||
|
||||
private SerializedProperty _flip;
|
||||
private static GUIContent s_RotationLabel = new GUIContent("* Rotation");
|
||||
private static GUIContent s_KeepAspectRatioLabel = new GUIContent("* Keep Aspect Ratio");
|
||||
|
||||
protected virtual void OnEnable()
|
||||
{
|
||||
@@ -134,6 +136,9 @@ namespace Coffee.UIEffects.Editors
|
||||
_transitionPatternReverse = serializedObject.FindProperty("m_TransitionPatternReverse");
|
||||
_transitionAutoPlaySpeed = serializedObject.FindProperty("m_TransitionAutoPlaySpeed");
|
||||
|
||||
s_RotationLabel.tooltip = _transitionRotation.tooltip;
|
||||
s_KeepAspectRatioLabel.tooltip = _transitionKeepAspectRatio.tooltip;
|
||||
|
||||
_targetMode = serializedObject.FindProperty("m_TargetMode");
|
||||
_targetColor = serializedObject.FindProperty("m_TargetColor");
|
||||
_targetRange = serializedObject.FindProperty("m_TargetRange");
|
||||
@@ -251,9 +256,8 @@ namespace Coffee.UIEffects.Editors
|
||||
EditorApplication.QueuePlayerLoopUpdate();
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_transitionRotation, EditorGUIUtility.TrTempContent("Rotation"));
|
||||
EditorGUILayout.PropertyField(_transitionKeepAspectRatio,
|
||||
EditorGUIUtility.TrTempContent("Keep Aspect Ratio"));
|
||||
EditorGUILayout.PropertyField(_transitionRotation, s_RotationLabel);
|
||||
EditorGUILayout.PropertyField(_transitionKeepAspectRatio, s_KeepAspectRatioLabel);
|
||||
EditorGUILayout.PropertyField(_transitionReverse, EditorGUIUtility.TrTempContent("Reverse"));
|
||||
EditorGUI.indentLevel--;
|
||||
|
||||
@@ -387,8 +391,7 @@ namespace Coffee.UIEffects.Editors
|
||||
EditorGUILayout.PropertyField(_gradationRotation);
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_transitionKeepAspectRatio,
|
||||
EditorGUIUtility.TrTempContent("Keep Aspect Ratio"));
|
||||
EditorGUILayout.PropertyField(_transitionKeepAspectRatio, s_KeepAspectRatioLabel);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
@@ -442,9 +445,8 @@ namespace Coffee.UIEffects.Editors
|
||||
EditorApplication.QueuePlayerLoopUpdate();
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_transitionRotation, EditorGUIUtility.TrTempContent("Rotation"));
|
||||
EditorGUILayout.PropertyField(_transitionKeepAspectRatio,
|
||||
EditorGUIUtility.TrTempContent("Keep Aspect Ratio"));
|
||||
EditorGUILayout.PropertyField(_transitionRotation, s_RotationLabel);
|
||||
EditorGUILayout.PropertyField(_transitionKeepAspectRatio, s_KeepAspectRatioLabel);
|
||||
EditorGUI.indentLevel--;
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
@@ -69,10 +69,14 @@ namespace Coffee.UIEffects
|
||||
[SerializeField]
|
||||
protected Vector2 m_TransitionTexSpeed = new Vector2(0, 0);
|
||||
|
||||
[Tooltip("Effect rotation (0–360).\n" +
|
||||
"NOTE: This property is shared between `Transition Filter` and `Detail Filter`.")]
|
||||
[SerializeField]
|
||||
[Range(0, 360)]
|
||||
private float m_TransitionRotation = 0;
|
||||
|
||||
[Tooltip("The effect maintains its aspect ratio.\n" +
|
||||
"NOTE: This property is shared between `Transition Filter`, `Gradation Mode`, and `Detail Filter`.")]
|
||||
[SerializeField]
|
||||
protected bool m_TransitionKeepAspectRatio = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user