internal static bool ShowAtPosition(Rect buttonRect) { if (DateTime.Now.Ticks / 10000L < SpriteEditorMenu.s_LastClosedTime + 50L) return false; Event.current.Use(); if ((UnityEngine.Object) SpriteEditorMenu.s_SpriteEditorMenu == (UnityEngine.Object) null) SpriteEditorMenu.s_SpriteEditorMenu = ScriptableObject.CreateInstance<SpriteEditorMenu>(); SpriteEditorMenu.s_SpriteEditorMenu.Init(buttonRect); return true; }
internal static bool ShowAtPosition(Rect buttonRect) { if (DateTime.Now.Ticks / 10000L < SpriteEditorMenu.s_LastClosedTime + 50L) { return(false); } Event.current.Use(); if ((UnityEngine.Object)SpriteEditorMenu.s_SpriteEditorMenu == (UnityEngine.Object)null) { SpriteEditorMenu.s_SpriteEditorMenu = ScriptableObject.CreateInstance <SpriteEditorMenu>(); } SpriteEditorMenu.s_SpriteEditorMenu.Init(buttonRect); return(true); }
internal static bool ShowAtPosition(Rect buttonRect) { long num = DateTime.Now.Ticks / 10000L; if (num >= SpriteEditorMenu.s_LastClosedTime + 50L) { Event.current.Use(); if (SpriteEditorMenu.s_SpriteEditorMenu == null) { SpriteEditorMenu.s_SpriteEditorMenu = ScriptableObject.CreateInstance<SpriteEditorMenu>(); } SpriteEditorMenu.s_SpriteEditorMenu.Init(buttonRect); return true; } return false; }
internal static bool ShowAtPosition(Rect buttonRect) { long num = DateTime.Now.Ticks / 10000L; if (num >= SpriteEditorMenu.s_LastClosedTime + 50L) { Event.current.Use(); if (SpriteEditorMenu.s_SpriteEditorMenu == null) { SpriteEditorMenu.s_SpriteEditorMenu = ScriptableObject.CreateInstance <SpriteEditorMenu>(); } SpriteEditorMenu.s_SpriteEditorMenu.Init(buttonRect); return(true); } return(false); }
internal static bool ShowAtPosition(Rect buttonRect, SpriteFrameModule sf, ITextureDataProvider textureProvider) { // We could not use realtimeSinceStartUp since it is set to 0 when entering/exitting playmode, we assume an increasing time when comparing time. long nowMilliSeconds = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond; bool justClosed = nowMilliSeconds < s_LastClosedTime + 50; if (!justClosed) { if (UnityEvent.current != null) // Event.current can be null during integration test { UnityEvent.current.Use(); } SpriteEditorMenu spriteEditorMenu = CreateInstance <SpriteEditorMenu>(); spriteEditorMenu.Init(buttonRect, sf, textureProvider); return(true); } return(false); }
internal static bool ShowAtPosition(Rect buttonRect, SpriteFrameModule sf, ITexture2D previewTexture, ITexture2D selectedTexture) { long num = DateTime.Now.Ticks / 10000L; bool result; if (num >= SpriteEditorMenu.s_LastClosedTime + 50L) { if (UnityEngine.Event.current != null) { UnityEngine.Event.current.Use(); } SpriteEditorMenu spriteEditorMenu = ScriptableObject.CreateInstance <SpriteEditorMenu>(); spriteEditorMenu.Init(buttonRect, sf, previewTexture, selectedTexture); result = true; } else { result = false; } return(result); }
internal static bool ShowAtPosition(Rect buttonRect, SpriteFrameModule sf, ITextureDataProvider textureProvider) { long num = DateTime.Now.Ticks / 10000L; bool result; if (num >= SpriteEditorMenu.s_LastClosedTime + 50L) { if (Event.current != null) { Event.current.Use(); } SpriteEditorMenu spriteEditorMenu = ScriptableObject.CreateInstance <SpriteEditorMenu>(); spriteEditorMenu.Init(buttonRect, sf, textureProvider); result = true; } else { result = false; } return(result); }
private void OnDisable() { SpriteEditorMenu.s_LastClosedTime = DateTime.Now.Ticks / 10000L; SpriteEditorMenu.s_SpriteEditorMenu = null; }
private void OnDisable() { Undo.undoRedoPerformed = (Undo.UndoRedoCallback)Delegate.Remove(Undo.undoRedoPerformed, new Undo.UndoRedoCallback(this.UndoRedoPerformed)); s_LastClosedTime = DateTime.Now.Ticks / 0x2710L; s_SpriteEditorMenu = null; }
private void OnDisable() { Undo.undoRedoPerformed -= new Undo.UndoRedoCallback(this.UndoRedoPerformed); SpriteEditorMenu.s_LastClosedTime = DateTime.Now.Ticks / 10000L; SpriteEditorMenu.s_SpriteEditorMenu = (SpriteEditorMenu) null; }
private void OnDisable() { Undo.undoRedoPerformed -= new Undo.UndoRedoCallback(this.UndoRedoPerformed); SpriteEditorMenu.s_LastClosedTime = DateTime.Now.Ticks / 10000L; SpriteEditorMenu.s_SpriteEditorMenu = (SpriteEditorMenu)null; }
private void OnDisable() { Undo.undoRedoPerformed = (Undo.UndoRedoCallback) Delegate.Remove(Undo.undoRedoPerformed, new Undo.UndoRedoCallback(this.UndoRedoPerformed)); s_LastClosedTime = DateTime.Now.Ticks / 0x2710L; s_SpriteEditorMenu = null; }