Пример #1
0
        private void Start()
        {
            for (int i = 0; i < m_customWindows.Length; ++i)
            {
                CustomWindowDescriptor customWindow = m_customWindows[i];
                if (customWindow != null && customWindow.Descriptor != null && !m_typeToCustomWindow.ContainsKey(customWindow.TypeName))
                {
                    m_typeToCustomWindow.Add(customWindow.TypeName, customWindow);
                }
            }

            m_sceneWindow.MaxWindows = m_editor.CameraLayerSettings.MaxGraphicsLayers;

            SetDefaultLayout();

            WindowDescriptor wd;
            GameObject       content;
            bool             isDialog;

            Transform tools = CreateWindow(RuntimeWindowType.ToolsPanel.ToString().ToLower(), out wd, out content, out isDialog);

            if (tools != null)
            {
                SetTools(tools);
            }
        }
Пример #2
0
        public bool RegisterWindow(CustomWindowDescriptor desc)
        {
            if (m_typeToCustomWindow.ContainsKey(desc.TypeName.ToLower()))
            {
                return(false);
            }

            m_typeToCustomWindow.Add(desc.TypeName.ToLower(), desc);
            return(true);
        }
Пример #3
0
        private void Start()
        {
            if (m_dockPanels == null)
            {
                m_dockPanels = FindObjectOfType <DockPanel>();
            }

            if (m_dialogManager == null)
            {
                m_dialogManager = FindObjectOfType <DialogManager>();
            }

            for (int i = 0; i < m_customWindows.Length; ++i)
            {
                CustomWindowDescriptor customWindow = m_customWindows[i];
                if (customWindow != null && customWindow.Descriptor != null && !m_typeToCustomWindow.ContainsKey(customWindow.TypeName))
                {
                    m_typeToCustomWindow.Add(customWindow.TypeName, customWindow);
                }
            }

            m_dockPanels.TabActivated   += OnTabActivated;
            m_dockPanels.TabDeactivated += OnTabDeactivated;
            m_dockPanels.TabClosed      += OnTabClosed;

            m_dockPanels.RegionBeforeDepthChanged += OnRegionBeforeDepthChanged;
            m_dockPanels.RegionDepthChanged       += OnRegionDepthChanged;
            m_dockPanels.RegionSelected           += OnRegionSelected;
            m_dockPanels.RegionUnselected         += OnRegionUnselected;
            m_dockPanels.RegionEnabled            += OnRegionEnabled;
            m_dockPanels.RegionDisabled           += OnRegionDisabled;
            m_dockPanels.RegionMaximized          += OnRegionMaximized;
            m_dockPanels.RegionBeforeBeginDrag    += OnRegionBeforeBeginDrag;
            m_dockPanels.RegionBeginResize        += OnBeginResize;
            m_dockPanels.RegionEndResize          += OnRegionEndResize;

            m_dialogManager.DialogDestroyed += OnDialogDestroyed;

            if (m_componentsRoot == null)
            {
                m_componentsRoot = transform;
            }

            m_editor = IOC.Resolve <IRTE>();
            m_sceneWindow.MaxWindows = m_editor.CameraLayerSettings.MaxGraphicsLayers;


            SetDefaultLayout();

            WindowDescriptor wd;
            GameObject       content;
            bool             isDialog;

            Transform tools = CreateWindow(RuntimeWindowType.ToolsPanel.ToString().ToLower(), out wd, out content, out isDialog);

            if (tools != null)
            {
                SetTools(tools);
            }

            m_dockPanels.CursorHelper = m_editor.CursorHelper;
        }