private void Init(Rect buttonRect) { if ((UnityEngine.Object) SpriteEditorMenu.s_Setting == (UnityEngine.Object) null) SpriteEditorMenu.s_Setting = ScriptableObject.CreateInstance<SpriteEditorMenuSetting>(); buttonRect = GUIUtility.GUIToScreenRect(buttonRect); Vector2 windowSize = new Vector2(300f, 145f); this.ShowAsDropDown(buttonRect, windowSize); Undo.undoRedoPerformed += new Undo.UndoRedoCallback(this.UndoRedoPerformed); }
private void Init(Rect buttonRect) { if ((UnityEngine.Object)SpriteEditorMenu.s_Setting == (UnityEngine.Object)null) { SpriteEditorMenu.s_Setting = ScriptableObject.CreateInstance <SpriteEditorMenuSetting>(); } buttonRect = GUIUtility.GUIToScreenRect(buttonRect); Vector2 windowSize = new Vector2(300f, 145f); this.ShowAsDropDown(buttonRect, windowSize); Undo.undoRedoPerformed += new Undo.UndoRedoCallback(this.UndoRedoPerformed); }
private void Init(Rect buttonRect) { if (s_Setting == null) { s_Setting = ScriptableObject.CreateInstance <SpriteEditorMenuSetting>(); } buttonRect = GUIUtility.GUIToScreenRect(buttonRect); float y = 145f; Vector2 windowSize = new Vector2(300f, y); base.ShowAsDropDown(buttonRect, windowSize, null, ShowMode.PopupMenuWithKeyboardFocus); Undo.undoRedoPerformed = (Undo.UndoRedoCallback)Delegate.Combine(Undo.undoRedoPerformed, new Undo.UndoRedoCallback(this.UndoRedoPerformed)); }
private void Init(Rect buttonRect, SpriteFrameModule sf, ITextureDataProvider dataProvider) { if (SpriteEditorMenu.s_Setting == null) { SpriteEditorMenu.s_Setting = ScriptableObject.CreateInstance <SpriteEditorMenuSetting>(); } this.m_SpriteFrameModule = sf; this.m_TextureDataProvider = dataProvider; buttonRect = GUIUtility.GUIToScreenRect(buttonRect); float y = 145f; Vector2 windowSize = new Vector2(300f, y); base.ShowAsDropDown(buttonRect, windowSize, null, ShowMode.PopupMenuWithKeyboardFocus); Undo.undoRedoPerformed = (Undo.UndoRedoCallback)Delegate.Combine(Undo.undoRedoPerformed, new Undo.UndoRedoCallback(this.UndoRedoPerformed)); }
private void Init(Rect buttonRect, SpriteFrameModule sf, ITextureDataProvider dataProvider) { // Create for once if setting was not created before. if (s_Setting == null) { s_Setting = CreateInstance <SpriteEditorMenuSetting>(); } m_SpriteFrameModule = sf; m_TextureDataProvider = dataProvider; buttonRect = GUIUtility.GUIToScreenRect(buttonRect); float windowHeight = 145; var windowSize = new Vector2(300, windowHeight); ShowAsDropDown(buttonRect, windowSize, null, ShowMode.PopupMenuWithKeyboardFocus); Undo.undoRedoPerformed += UndoRedoPerformed; }
private void Init(Rect buttonRect) { if (s_Setting == null) { s_Setting = ScriptableObject.CreateInstance<SpriteEditorMenuSetting>(); } buttonRect = GUIUtility.GUIToScreenRect(buttonRect); float y = 145f; Vector2 windowSize = new Vector2(300f, y); base.ShowAsDropDown(buttonRect, windowSize); Undo.undoRedoPerformed = (Undo.UndoRedoCallback) Delegate.Combine(Undo.undoRedoPerformed, new Undo.UndoRedoCallback(this.UndoRedoPerformed)); }