public UTinyAssetPreviewControl(IRegistry registry, UTinyProject.Reference project, UTinyModule.Reference mainModule)
 {
     m_Registry   = registry;
     m_Project    = project;
     m_MainModule = mainModule;
     m_Assets     = new List <UTinyAssetInfo>();
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 public UTinyEditorContext(UTinyProject.Reference project, EditorContextType type, UTinyContext context, UTinyEditorWorkspace workspace)
 {
     m_Project          = project;
     ContextType        = type;
     Context            = context ?? new UTinyContext();
     Workspace          = workspace ?? new UTinyEditorWorkspace();
     Undo               = new UTinyUndo(Registry, Caretaker);
     EntityGroupManager = new UTinyEntityGroupManager(this);
 }
コード例 #4
0
        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);
        }
コード例 #5
0
 public UTinyProjectSettingsPanel(IRegistry registry, UTinyProject.Reference project)
 {
     m_Registry = registry;
     m_Project  = project;
 }
コード例 #6
0
 public UTinyModuleTreeModel(IRegistry registry, UTinyProject.Reference project, UTinyModule.Reference mainModule) : base(registry, mainModule)
 {
     Project = project;
 }