예제 #1
0
        protected void RenamingGUI()
        {
            int controlID = GUIUtility.GetControlID(FocusType.Keyboard) + 1;

            if (_renaming == RenamingState.StandBy)
            {
                GUIUtility.keyboardControl        = controlID;
                EditorGUIUtility.editingTextField = true;
                _renaming = RenamingState.Renaming;
            }

            Target.name = EditorGUILayout.TextField(Target.name, NodeResources.Styles.nodeHeader, GUILayout.Height(NodePreferences.PROPERTY_HEIGHT));

            if (EditorGUIUtility.editingTextField)
            {
                return;
            }
            Rename(Target.name);
            _renaming = RenamingState.Idle;
        }
예제 #2
0
 public void InitiateRename()
 {
     _renaming = RenamingState.StandBy;
 }