Exemplo n.º 1
0
        private void InitializeSceneView()
        {
            m_renderer        = new RendererSurfaceControl();
            m_renderer.Left   = 0;
            m_renderer.Top    = m_toolbar == null ? 0 : m_toolbar.Bottom;
            m_renderer.Width  = Width;
            m_renderer.Height = Height;
            m_renderer.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom;
            Controls.Add(m_renderer);
            m_renderer.ZoomChanged += m_renderer_ZoomChanged;

            m_gameObjectsPanel = new MetroSidePanel();
            MetroSkinManager.ApplyMetroStyle(m_gameObjectsPanel);
            m_gameObjectsPanel.Text            = "Game Objects";
            m_gameObjectsPanel.Side            = DockStyle.Left;
            m_gameObjectsPanel.IsRolled        = false;
            m_gameObjectsPanel.AnimatedRolling = false;
            m_gameObjectsPanel.IsDockable      = false;
            m_gameObjectsPanel.OffsetPadding   = new Padding(0, DEFAULT_TOOLBAR_HEIGHT, 0, 0);
            m_gameObjectsPanel.Width           = 200;
            m_gameObjectsPanel.Height          = Height;
            m_gameObjectsPanel.Rolled         += new EventHandler(m_gameObjectsPanel_RollUnroll);
            m_gameObjectsPanel.Unrolled       += new EventHandler(m_gameObjectsPanel_RollUnroll);
            Controls.Add(m_gameObjectsPanel);
            m_gameObjectsPanel.BringToFront();

            m_gameObjectsTree = new TreeView();
            MetroSkinManager.ExtendMetroStyle(m_gameObjectsTree);
            m_gameObjectsTree.BorderStyle     = System.Windows.Forms.BorderStyle.None;
            m_gameObjectsTree.Dock            = DockStyle.Fill;
            m_gameObjectsTree.NodeMouseClick += new TreeNodeMouseClickEventHandler(m_gameObjectsTree_NodeMouseClick);
            m_gameObjectsPanel.Content.Controls.Add(m_gameObjectsTree);

            UpdateLayout();
            UpdateToolbarScrollbars();
        }