internal bool Display ( )
{
// Transition Header
EditorGUI . DrawRect ( EditorGUILayout . BeginHorizontal ( ) , ContentStyle . DarkGray ) ;
EditorGUI . DrawRect ( EditorGUILayout . BeginHorizontal ( GUILayout . Height ( 2 4 ) ) , ContentStyle . DarkGray ) ;
EditorGUILayout . Space ( 3f , false ) ;
// TODO: Fix the space in between the labels above and the buttons below
// Right now the buttons disappear to the right if the Inspector is made too narrow
if ( GUILayout . Button ( EditorGUIUtility . IconContent ( "scrollup" ) , GUILayout . Width ( 3 5 ) , GUILayout . Height ( 1 6 ) ) )
if ( GUILayout . Button ( EditorGUIUtility . IconContent ( "scrollup" ) , GUILayout . Width ( 3 0 ) , GUILayout . Height ( 1 8 ) ) )
if ( GUILayout . Button ( EditorGUIUtility . IconContent ( "scrolldown" ) , GUILayout . Width ( 3 5 ) , GUILayout . Height ( 1 6 ) ) )
if ( GUILayout . Button ( EditorGUIUtility . IconContent ( "scrolldown" ) , GUILayout . Width ( 3 0 ) , GUILayout . Height ( 1 8 ) ) )
if ( GUILayout . Button ( EditorGUIUtility . IconContent ( "Toolbar Minus" ) , GUILayout . Width ( 3 5 ) , GUILayout . Height ( 1 6 ) ) )
if ( GUILayout . Button ( EditorGUIUtility . IconContent ( "Toolbar Minus" ) , GUILayout . Width ( 3 0 ) , GUILayout . Height ( 1 8 ) ) )
{
_editor . RemoveTransition ( SerializedTransition . Index ) ;
return true ;
{
EditorGUI . PropertyField ( new Rect ( rect . x , rect . y , 1 5 0 , rect . height ) , condition , GUIContent . none ) ;
}
EditorGUI . LabelField ( new Rect ( rect . x + rect . width - 1 2 0 , rect . y , 2 0 , rect . height ) , "Is" ) ;
EditorGUI . LabelField ( new Rect ( rect . x + rect . width - 8 0 , rect . y , 2 0 , rect . height ) , "Is" ) ;
EditorGUI . PropertyField ( new Rect ( rect . x + 2 0 , rect . y + EditorGUIUtility . singleLineHeight + 5 , 6 0 , rect . height ) , prop . FindPropertyRelative ( "Operator" ) , GUIContent . none ) ;
// Only display the logic condition if there's another one after this
if ( index < reorderableList . count - 1 )
EditorGUI . PropertyField ( new Rect ( rect . x + 2 0 , rect . y + EditorGUIUtility . singleLineHeight + 5 , 6 0 , rect . height ) , prop . FindPropertyRelative ( "Operator" ) , GUIContent . none ) ;
} ;
reorderableList . onChangedCallback + = list = > list . serializedProperty . serializedObject . ApplyModifiedProperties ( ) ;