public UTinyAssetPreviewControl(IRegistry registry, UTinyProject.Reference project, UTinyModule.Reference mainModule)
 {
     m_Registry   = registry;
     m_Project    = project;
     m_MainModule = mainModule;
     m_Assets     = new List <UTinyAssetInfo>();
 }
        public UTinyModulePanel(IRegistry registry, UTinyProject.Reference project, UTinyModule.Reference mainModule, State state)
        {
            Registry   = registry;
            Project    = project;
            MainModule = mainModule;

            if (null == state.TreeState)
            {
                state.TreeState = new UTinyTreeState();
            }

            // @TODO Find a way to move this to the base class
            state.TreeState.Init(UTinyModuleTreeView.CreateMultiColumnHeaderState());

            var treeView = new UTinyModuleTreeView(state.TreeState, new UTinyModuleTreeModel(Registry, Project, MainModule));

            // Add an empty toolbar for consistency
            var toolbar = new UTinyToolbar();

            toolbar.Add(new UTinyToolbar.Search
            {
                Alignment    = UTinyToolbar.Alignment.Center,
                SearchString = treeView.SearchString,
                Changed      = searchString =>
                {
                    treeView.SearchString = searchString;
                }
            });

            AddElement(toolbar);
            AddElement(treeView);
        }
        public UTinyCodePanel(IRegistry registry, UTinyModule.Reference mainModule, State state)
        {
            m_Registry   = registry;
            m_MainModule = mainModule;

            // Init tree
            if (null == state.TreeState)
            {
                state.TreeState = new UTinyCodeTreeState();
            }

            state.TreeState.Init(UTinyCodeTreeView.CreateMultiColumnHeaderState());
            m_TreeView = new UTinyCodeTreeView(state.TreeState, new UTinyCodeTreeModel(registry, mainModule))
            {
                HasContextMenu = true,
            };

            // Init code editors
            m_SystemEditorControl = new UTinySystemEditorControl(registry, mainModule);
            m_ScriptEditorControl = new UTinyScriptEditorControl(registry);

            // Register events
            m_TreeView.OnContextMenuEvent       += HandleContextMenuEvent;
            m_TreeView.OnRenameEnded            += HandleRenameEnded;
            m_SystemEditorControl.OnRenameEnded += HandleRenameEnded;
            m_ScriptEditorControl.OnRenameEnded += HandleRenameEnded;

            var leftPanel = new UTinyPanel();

            leftPanel.AddElement(CreateLeftToolbar());
            leftPanel.AddElement(m_TreeView);

            m_RightPanel = new UTinyPanel();
            m_RightPanel.AddElement(CreateRightToolbar());
            m_RightPanel.AddElement(m_SystemEditorControl);

            if (null == state.SeparatorState)
            {
                state.SeparatorState = new Separator.State();
            }

            var separator = new Separator(leftPanel, m_RightPanel, state.SeparatorState)
            {
                MinLeft  = 350,
                MinRight = 300
            };

            AddElement(separator);

            if (null != UTinySystemExecutionGraphWindow.Instance)
            {
                UTinySystemExecutionGraphWindow.Instance.Registry = m_Registry;
                UTinySystemExecutionGraphWindow.Instance.Module   = m_MainModule;
            }
        }
Ejemplo n.º 4
0
        public UTinyBuildReportPanel(IRegistry registry, UTinyModule.Reference mainModule, State state)
        {
            Registry   = registry;
            MainModule = mainModule;

            if (state.TreeState == null)
            {
                state.TreeState = new UTinyTreeState();
            }

            // @TODO Find a way to move this to the base class
            state.TreeState.Init(UTinyBuildReportTreeView.CreateMultiColumnHeaderState());

            var treeView = new UTinyBuildReportTreeView(state.TreeState, new UTinyBuildReportTreeModel(registry, mainModule));

            AddElement(treeView);
        }
        public UTinySystemEditorControl(IRegistry registry, UTinyModule.Reference mainModule)
        {
            m_Registry   = registry;
            m_MainModule = mainModule;

            m_ExecuteAfterList = new ReorderableList(new ArrayList(), typeof(UTinySystem.Reference))
            {
                displayAdd    = true,
                displayRemove = true
            };

            m_ExecuteAfterList.drawHeaderCallback    += HandleExecuteAfterListDrawHeader;
            m_ExecuteAfterList.drawElementCallback   += HandleExecuteAfterListDrawElement;
            m_ExecuteAfterList.onAddDropdownCallback += HandleExecuteAfterListAddDropdown;
            m_ExecuteAfterList.onRemoveCallback      += HandleExecuteAfterListRemove;
            m_ExecuteAfterList.onReorderCallback     += RebuildExecuteAfterReferences;

            m_ExecuteBeforeList = new ReorderableList(new ArrayList(), typeof(UTinySystem.Reference))
            {
                displayAdd    = true,
                displayRemove = true
            };

            m_ExecuteBeforeList.drawHeaderCallback    += HandleExecuteBeforeListDrawHeader;
            m_ExecuteBeforeList.drawElementCallback   += HandleExecuteBeforeListDrawElement;
            m_ExecuteBeforeList.onAddDropdownCallback += HandleExecuteBeforeListAddDropdown;
            m_ExecuteBeforeList.onRemoveCallback      += HandleExecuteBeforeListRemove;
            m_ExecuteBeforeList.onReorderCallback     += RebuildExecuteBeforeReferences;

            m_ComponentList = new ReorderableList(new ArrayList(), typeof(UTinyType.Reference))
            {
                displayAdd    = true,
                displayRemove = true
            };

            m_ComponentList.drawHeaderCallback    += HandleComponentListDrawHeader;
            m_ComponentList.drawElementCallback   += HandleComponentListDrawElement;
            m_ComponentList.onAddDropdownCallback += HandleComponentListAddDropdown;
            m_ComponentList.onRemoveCallback      += HandleComponentListRemove;
            m_ComponentList.onReorderCallback     += RebuildComponentReferenceList;
        }
        public UTinyAssetPanel(IRegistry registry, UTinyProject.Reference project, UTinyModule.Reference mainModule, State state)
        {
            m_Registry   = registry;
            m_Project    = project;
            m_MainModule = mainModule;

            UnityEngine.Assertions.Assert.IsNotNull(state);

            if (null == state.TreeState)
            {
                state.TreeState = new UTinyAssetTreeState();
            }
            // @TODO Find a way to move this to the base class
            state.TreeState.Init(UTinyAssetTreeView.CreateMultiColumnHeaderState());

            m_TreeView = new UTinyAssetTreeView(state.TreeState, new UTinyAssetTreeModel(m_Registry, m_MainModule));

            m_AssetPreviewControl = new UTinyAssetPreviewControl(m_Registry, m_Project, m_MainModule);

            m_LeftPanel = new UTinyPanel();
            m_LeftPanel.AddElement(CreateLeftToolbar());
            m_LeftPanel.AddElement(m_TreeView);

            m_RightPanel = new UTinyPanel();
            m_RightPanel.AddElement(CreateRightToolbar());
            m_RightPanel.AddElement(m_AssetPreviewControl);

            if (null == state.SeparatorState)
            {
                state.SeparatorState = new Separator.State();
            }

            m_Separator = new Separator(m_LeftPanel, m_RightPanel, state.SeparatorState)
            {
                MinLeft  = 350,
                MinRight = 300
            };

            AddElement(m_Separator);
        }
        public UTinyEntityGroupPanel(IRegistry registry, UTinyModule.Reference mainModule, State state)
        {
            m_Registry           = registry;
            m_MainModule         = mainModule;
            m_EntityGroupManager = UTinyEditorApplication.EntityGroupManager;

            if (null == state.TreeState)
            {
                state.TreeState = new UTinyEntityGroupTreeState();
            }

            state.TreeState.Init(UTinyEntityGroupTreeView.CreateMultiColumnHeaderState());

            m_TreeView = new UTinyEntityGroupTreeView(state.TreeState, new UTinyEntityGroupTreeModel(m_Registry, m_MainModule))
            {
                HasContextMenu = true
            };
            m_TreeView.OnContextMenuEvent += HandleContextMenuEvent;

            AddElement(CreateToolbar());
            AddElement(m_TreeView);
        }
Ejemplo n.º 8
0
        public UTinyTypePanel(IRegistry registry, UTinyModule.Reference mainModule, State state)
        {
            Assert.IsNotNull(state);

            m_Registry   = registry;
            m_MainModule = mainModule;

            if (null == state.TreeState)
            {
                state.TreeState = new UTinyTypeTreeState();
            }

            state.TreeState.Init(UTinyTypeTreeView.CreateMultiColumnHeaderState());

            m_TreeView = new UTinyTypeTreeView(state.TreeState, new UTinyTypeTreeModel(m_Registry, mainModule))
            {
                HasContextMenu = true
            };
            m_TreeView.OnContextMenuEvent += HandleContextMenuEvent;

            AddElement(CreateToolbar());
            AddElement(m_TreeView);
        }
 public UTinyTypeTreeModel(IRegistry registry, UTinyModule.Reference mainModule) : base(registry, mainModule)
 {
 }
 protected UTinyTreeModel(IRegistry registry, UTinyModule.Reference mainModule)
 {
     m_Objects  = new Dictionary <int, object>();
     Registry   = registry;
     MainModule = mainModule;
 }
Ejemplo n.º 11
0
 public UTinyAssetTreeModel(IRegistry registry, UTinyModule.Reference mainModule)
 {
     Registry   = registry;
     MainModule = mainModule;
     m_Assets   = new Dictionary <int, UTinyAssetInfo>();
 }
Ejemplo n.º 12
0
 public UTinyBuildReportTreeModel(IRegistry registry, UTinyModule.Reference mainModule) : base(registry, mainModule)
 {
 }
Ejemplo n.º 13
0
 protected UTinyTreeViewItem(IRegistry registry, UTinyModule.Reference mainModule, UTinyModule.Reference module)
 {
     Registry   = registry;
     MainModule = mainModule;
     Module     = module;
 }
 public UTinyEntityGroupTreeModel(IRegistry registry, UTinyModule.Reference mainModule) : base(registry, mainModule)
 {
 }
Ejemplo n.º 15
0
 public UTinyModuleTreeViewItem(IRegistry registry, UTinyModule.Reference mainModule, UTinyModule.Reference module) : base(registry, mainModule, module)
 {
     m_Included = mainModule.Dereference(registry).ContainsExplicitModuleDependency(module);
 }
Ejemplo n.º 16
0
 public UTinyModuleSettingsPanel(IRegistry registry, UTinyModule.Reference module)
 {
     m_Registry = registry;
     m_Module   = module;
 }
Ejemplo n.º 17
0
 public UTinyModuleTreeModel(IRegistry registry, UTinyProject.Reference project, UTinyModule.Reference mainModule) : base(registry, mainModule)
 {
     Project = project;
 }
Ejemplo n.º 18
0
 public void AddExplicitReference(UTinyModule.Reference module)
 {
     m_ExplicitReferences.Add(module);
 }