Exemple #1
0
 public MainForm()
 {
   InitializeComponent();
   CustomControls.Controls.Helper.InsertAutoScrollLosingWorkaround(m_SplitContainer.Panel1, m_SceneView);
   m_ProjectExplorer.Editor = this;
   m_TemplatesExplorer.Editor = this;
   m_SceneView.Editor = this;
   
   ScalingHelper scalingHelper = new GLScalingHelper(m_SceneView, m_GLBackground,
     m_MinusBtn, m_PercentsTextBox, m_PlusBtn);
   m_SceneView.ScalingHelper = scalingHelper;
   scalingHelper.ScaleChanged += this.OnScaleChanged;
   scalingHelper.ScalePercents = Settings.ScalePercentsDefault;
   scalingHelper.MinScalePercents = Settings.ScalePercentsMin;
   scalingHelper.MaxScalePercents = Settings.ScalePercentsMax;
   
   Solution solution = new Solution(this);
   solution.NewScenes += this.OnNewScenes;
   solution.ProjectNameChanged += this.OnProjectNameChanged;
   
   CreateScenes();
   OnProjectNameChanged(solution, null);
 }
Exemple #2
0
 public Solution(IEditor editor)
 {
   Solution.Instance = this;
   m_Editor = editor;
 }
Exemple #3
0
 private void OnProjectNameChanged(Solution sender, string previous)
 {
   string title = "SceneEditor";
   if(!string.IsNullOrEmpty(sender.ProjectName))
   {
     title += " - " + sender.ProjectName;
   }
   
   this.Text = title;
 }
Exemple #4
0
 private void OnNewScenes(Solution sender, ScenesSet previous)
 {
   if(previous != null)
   {
     previous.SceneRemoved -= this.OnSceneRemoved;
   }
   
   m_ProjectExplorer.Scenes = sender.Scenes;
   m_TemplatesExplorer.Scenes = sender.Scenes;
   if(sender.Scenes != null)
   {
     sender.Scenes.SceneRemoved += this.OnSceneRemoved;
   }
 }