public bool BeginRename(string name, int userData, float delay) { if (this.m_IsRenaming) { Debug.LogError("BeginRename fail: already renaming"); return(false); } this.m_Name = name; this.m_OriginalName = name; this.m_UserData = userData; this.m_UserAcceptedRename = false; this.m_IsWaitingForDelay = (delay > 0f); this.m_IsRenaming = true; this.m_EditFieldRect = new Rect(0f, 0f, 0f, 0f); this.m_ClientGUIView = GUIView.current; if (delay > 0f) { this.m_DelayedCallback = new DelayedCallback(new Action(this.BeginRenameInternalCallback), (double)delay); } else { this.BeginRenameInternalCallback(); } return(true); }
// Returns true if started renaming public bool BeginRename(string name, int userData, float delay) { if (m_IsRenaming) { return(false); } m_Name = name; m_OriginalName = name; m_UserData = userData; m_UserAcceptedRename = false; m_IsWaitingForDelay = delay > 0f; m_IsRenaming = true; m_EditFieldRect = new Rect(0, 0, 0, 0); m_ClientGUIView = GUIView.current; if (delay > 0f) { m_DelayedCallback = new DelayedCallback(BeginRenameInternalCallback, delay); } else { BeginRenameInternalCallback(); } return(true); }
public bool BeginRename(string name, int userData, float delay) { if (this.m_IsRenaming) { Debug.LogError("BeginRename fail: already renaming"); return false; } this.m_Name = name; this.m_OriginalName = name; this.m_UserData = userData; this.m_UserAcceptedRename = false; this.m_IsWaitingForDelay = delay > 0f; this.m_IsRenaming = true; this.m_EditFieldRect = new Rect(0f, 0f, 0f, 0f); this.m_ClientGUIView = GUIView.current; if (delay > 0f) { this.m_DelayedCallback = new DelayedCallback(new Action(this, (IntPtr) this.BeginRenameInternalCallback), (double) delay); } else { this.BeginRenameInternalCallback(); } return true; }