public Panel(int instanceID, ContextType contextType, LoadResourceFunction loadResourceDelegate = null, IDataWatchService dataWatch = null, IDispatcher dispatcher = null) { this.instanceID = instanceID; this.contextType = contextType; LoadResourceFunction arg_3B_1 = loadResourceDelegate; if (loadResourceDelegate == null) { if (Panel.< > f__mg$cache0 == null) { Panel.< > f__mg$cache0 = new LoadResourceFunction(Resources.Load); } arg_3B_1 = Panel.< > f__mg$cache0; } this.loadResourceFunc = arg_3B_1; this.dataWatch = dataWatch; this.dispatcher = dispatcher; this.stylePainter = new StylePainter(); this.m_RootContainer = new VisualContainer(); this.m_RootContainer.name = VisualElementUtils.GetUniqueName("PanelContainer"); this.visualTree.ChangePanel(this); this.m_StyleContext = new StyleContext(this.m_RootContainer); this.defaultIMRoot = new IMContainer { name = "DefaultOnGUI", pickingMode = PickingMode.Ignore }; this.defaultIMRoot.StretchToParentSize(); this.visualTree.InsertChild(0, this.defaultIMRoot); this.allowPixelCaching = true; }
public Panel(ScriptableObject ownerObject, ContextType contextType, IDataWatchService dataWatch = null, IEventDispatcher dispatcher = null) { this.ownerObject = ownerObject; this.contextType = contextType; this.m_DataWatch = dataWatch; this.dispatcher = dispatcher; this.stylePainter = new StylePainter(); this.m_RootContainer = new VisualElement(); this.m_RootContainer.name = VisualElementUtils.GetUniqueName("PanelContainer"); this.m_RootContainer.persistenceKey = "PanelContainer"; this.visualTree.ChangePanel(this); this.focusController = new FocusController(new VisualElementFocusRing(this.visualTree, VisualElementFocusRing.DefaultFocusOrder.ChildOrder)); this.m_StyleContext = new StyleContext(this.m_RootContainer); this.allowPixelCaching = true; }
public Panel(ScriptableObject ownerObject, ContextType contextType, IDataWatchService dataWatch = null, IEventDispatcher dispatcher = null) { this.ownerObject = ownerObject; this.contextType = contextType; m_DataWatch = dataWatch; this.dispatcher = dispatcher; stylePainter = new StylePainter(); cursorManager = new CursorManager(); contextualMenuManager = null; m_RootContainer = new VisualElement(); m_RootContainer.name = VisualElementUtils.GetUniqueName("PanelContainer"); m_RootContainer.persistenceKey = "PanelContainer"; // Required! visualTree.SetPanel(this); focusController = new FocusController(new VisualElementFocusRing(visualTree)); m_StyleContext = new StyleSheets.StyleContext(m_RootContainer); allowPixelCaching = true; }
public Panel(ScriptableObject ownerObject, ContextType contextType, IDataWatchService dataWatch = null, EventDispatcher dispatcher = null) { m_VisualTreeUpdater = new VisualTreeUpdater(this); this.ownerObject = ownerObject; this.contextType = contextType; m_DataWatch = dataWatch; this.dispatcher = dispatcher ?? EventDispatcher.instance; repaintData = new RepaintData(); cursorManager = new CursorManager(); contextualMenuManager = null; m_RootContainer = new VisualElement(); m_RootContainer.name = VisualElementUtils.GetUniqueName("PanelContainer"); m_RootContainer.persistenceKey = "PanelContainer"; // Required! visualTree.SetPanel(this); focusController = new FocusController(new VisualElementFocusRing(visualTree)); m_ProfileUpdateName = "PanelUpdate"; m_ProfileLayoutName = "PanelLayout"; m_ProfileBindingsName = "PanelBindings"; allowPixelCaching = true; }