/************************************************************************************************************************/ private void DoPersistentCallGUI(Rect area, int index, bool isActive, bool isFocused) { DrawerState.Current.callIndex = index; var callProperty = _CurrentCallList.serializedProperty.GetArrayElementAtIndex(index); area.x += Border; area.y += Border; area.height -= Border * 2; PersistentCallDrawer.includeRemoveButton = true; EditorGUI.PropertyField(area, callProperty); if (PersistentCallDrawer.DoRemoveButtonGUI(area)) { DelayedRemoveCall(index); } if (isFocused) { CheckInput(index); } DrawerState.Current.callIndex = -1; }
/************************************************************************************************************************/ private void DoPersistentCallGUI(Rect area, int index, bool isActive, bool isFocused) { DrawerState.Current.callIndex = index; var callProperty = _CurrentCallList.serializedProperty.GetArrayElementAtIndex(index); area.x += Border; area.y += Border; area.height -= Border * 2; float originalAreaX = area.x; float originalAreaWidth = area.width; float originalAreaHeight = area.height; float delayPropertyWidth = 44f; area.width -= delayPropertyWidth; area.height = EditorGUIUtility.singleLineHeight; PersistentCallDrawer.includeRemoveButton = true; EditorGUI.PropertyField(area, callProperty); area.x += area.width - 15f; area.width = delayPropertyWidth - 18f; EditorGUI.PropertyField(area, callProperty.FindPropertyRelative("MethodDelay"), GUIContent.none); area.x = originalAreaX; area.width = originalAreaWidth; area.height = originalAreaHeight; if (PersistentCallDrawer.DoRemoveButtonGUI(area)) { DelayedRemoveCall(index); } if (isFocused) { CheckInput(index); } DrawerState.Current.callIndex = -1; }